Every folder all the way down within modules and its child folders needs to have a __init__.py file. You are probabaly missing one somewhere there,
On Wednesday, March 20, 2013 5:35:36 AM UTC-5, Phillipp Schmidt wrote: > > > Hi. Could you post the error traceback of the import error? >> > Here is the traceback. My current workaround is to put the package in the > web2py site-packages, but it would be great to include it in modules, so I > can share the application without telling people to include tablib in their > web2py site-packages. > > Traceback (most recent call last): > File "/home/philsch/web2py/gluon/restricted.py", line 212, in restricted > exec ccode in environment > File "/home/philsch/web2py/applications/sblink/controllers/default.py" > <http://127.0.0.1:8001/admin/default/edit/sblink/controllers/default.py>, > line 88, in <module> > File "/home/philsch/web2py/gluon/globals.py", line 193, in <lambda> > self._caller = lambda f: f() > File "/home/philsch/web2py/applications/sblink/controllers/default.py" > <http://127.0.0.1:8001/admin/default/edit/sblink/controllers/default.py>, > line 47, in render > import applications.sblink.modules.tablib as tablib > File "/home/philsch/web2py/gluon/custom_import.py", line 96, in > custom_importer > return NATIVE_IMPORTER(name, globals, locals, fromlist, level) > File "applications/sblink/modules/tablib/__init__.py", line 3, in <module> > from tablib.core import ( > File "/home/philsch/web2py/gluon/custom_import.py", line 83, in > custom_importer > return base_importer(pname, globals, locals, fromlist, level) > File "applications/sblink/modules/tablib/core.py", line 15, in <module> > from tablib import formats > File "/home/philsch/web2py/gluon/custom_import.py", line 83, in > custom_importer > return base_importer(pname, globals, locals, fromlist, level) > File "applications/sblink/modules/tablib/formats/__init__.py", line 6, in > <module> > from . import _csv as csv > File "/home/philsch/web2py/gluon/custom_import.py", line 96, in > custom_importer > return NATIVE_IMPORTER(name, globals, locals, fromlist, level) > File "applications/sblink/modules/tablib/formats/_csv.py", line 6, in > <module> > from tablib.compat import is_py3, csv, StringIO > File "/home/philsch/web2py/gluon/custom_import.py", line 83, in > custom_importer > return base_importer(pname, globals, locals, fromlist, level) > File "applications/sblink/modules/tablib/compat.py", line 43, in <module> > import tablib.packages.xlwt as xlwt > File "/home/philsch/web2py/gluon/custom_import.py", line 77, in > custom_importer > raise ImportError, 'Cannot import module %s' % str(e) > ImportError: Cannot import module 'tablib' > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.