adding routes.py causes a module import error

22 views
Skip to first unread message

vald...@gmail.com

unread,
Feb 12, 2024, 8:34:10 AMFeb 12
to web2py-users
Hi,
I'm using web2py Version 2.27.1-stable+timestamp.2023.11.16.08.03.57.

Whenever I add a routes.py file I get the below error.
I've tried adding "from gluon import fileutils" to the top of the routes.py file even though the issue appears to be with rewrite.py.

Any ideas?

Traceback (most recent call last):
  File "/home/vgr2/w2p_srv/web2py/web2py.py", line 44, in <module>
    import gluon.widget
  File "/home/vgr2/w2p_srv/web2py/gluon/widget.py", line 26, in <module>
    from gluon import main, newcron
  File "/home/vgr2/w2p_srv/web2py/gluon/main.py", line 120, in <module>
    load_routes()
  File "/home/vgr2/w2p_srv/web2py/gluon/rewrite.py", line 452, in load
    load(routes, appname)
  File "/home/vgr2/w2p_srv/web2py/gluon/rewrite.py", line 380, in load
    exec(data, symbols)
  File "<string>", line 21, in <module>
ModuleNotFoundError: No module named 'fileutils'
Reply all
Reply to author
Forward
0 new messages