<type 'exceptions.ImportError'>

25 views
Skip to first unread message

Auden RovelleQuartz

unread,
Jun 28, 2015, 9:19:46 AM6/28/15
to web...@googlegroups.com

Error ticket for "omniavx_joe"

Ticket ID

24.211.17.122.2015-06-28.08-43-36.388910c0-3f65-456d-bcf2-7ee2c50e441e

<type 'exceptions.ImportError'> No module named omniavx_joe.modules.app_constants

Version

web2py™Version 2.11.2-stable+timestamp.2015.05.30.16.33.24
PythonPython 2.7.6: /usr/bin/python (prefix: /usr)

Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
Traceback (most recent call last):
File "/home/www-data/web2py/gluon/restricted.py", line 227, in restricted
exec ccode in environment
File "/home/www-data/web2py/applications/omniavx_joe/models/db.py", line 23, in <module>
from applications.omniavx_joe.modules.app_constants import * #CDN-000016
File "/home/www-data/web2py/gluon/custom_import.py", line 108, in custom_importer
return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
ImportError: No module named omniavx_joe.modules.app_constants

this one is stumping me.... anyone has a clue on what could be causing this error?

(__init__.py is in the modules folder...)

Massimo Di Pierro

unread,
Jun 28, 2015, 12:19:13 PM6/28/15
to web...@googlegroups.com, oves...@gmail.com
Not sure but you do not need

from applications.omniavx_joe.modules.app_constants import *
try instead:
from app_constants import *
less things can go bad

Auden RovelleQuartz

unread,
Jun 29, 2015, 3:13:21 AM6/29/15
to web...@googlegroups.com, oves...@gmail.com
thanks Massimo

a related error I get after that is:

Error ticket for "omniavx_joe"

Ticket ID

108.234.157.233.2015-06-29.03-00-34.5b339bb8-b672-4ea0-a143-c0f6302be3ab

<type 'exceptions.AttributeError'> 'module' object has no attribute 'application'

Version

web2py™Version 2.11.2-stable+timestamp.2015.05.30.16.33.24
PythonPython 2.7.6: /usr/bin/python (prefix: /usr)

Traceback

1.
2.
3.
4.
5.
6.
7.
Traceback (most recent call last):
File "/home/www-data/web2py/gluon/restricted.py", line 227, in restricted
exec ccode in environment
  File "/home/www-data/web2py/applications/omniavx_joe/models/menu.py", line 10, in <module>
response.title = request.application.replace('_',' ').title()
AttributeError: 'module' object has no attribute 'application'


the menu.py file is as it is default - no modifications made...


for both cases, the code seemed to work on previous version - - - any more ideas greatly appreciated :^)

thanks!

Massimo Di Pierro

unread,
Jun 29, 2015, 3:25:07 AM6/29/15
to web...@googlegroups.com, oves...@gmail.com
request is a web2py object. I think you are importing a module called request (or there is something you import from a module called request) that shadows the web2py request object.

look for a
   import request
and replace it with
   import request as other_request
Reply all
Reply to author
Forward
0 new messages