Closed tomjirsa closed 7 years ago
Something has to be changed in web2py framework.
@tomaspvk - please check deploy on your machine to confirm the bug
Seems like the issue is that chgpasswd.py script cannot find gluon directory and import the necessary files from it (such as gluon.fileutils, where the abspath function is located) installing fileutils with pip is unnecessary. Adding
import sys
sys.path.append("/var/www/web2py/gluon")
to the file makes script successfully execute, however I need to test it a bit more.
Checked the fix.
Error still stays the same, eventhough the chgpasswd.py contains the string:
import sys
sys.path.append("/var/www/web2py/gluon")
Apache2 error log:
[Tue Jul 18 13:22:12.951122 2017] [wsgi:error] [pid 22268:tid 140002263254784] [remote 192.168.0.1:40920] mod_wsgi (pid=22268): Target WSGI script '/var/www/web2py/wsgihandler.py' cannot be loaded as Python module.
[Tue Jul 18 13:22:12.951394 2017] [wsgi:error] [pid 22268:tid 140002263254784] [remote 192.168.0.1:40920] mod_wsgi (pid=22268): Exception occurred processing WSGI script '/var/www/web2py/wsgihandler.py'.
[Tue Jul 18 13:22:12.951439 2017] [wsgi:error] [pid 22268:tid 140002263254784] [remote 192.168.0.1:40920] Traceback (most recent call last):
[Tue Jul 18 13:22:12.951480 2017] [wsgi:error] [pid 22268:tid 140002263254784] [remote 192.168.0.1:40920] File "/var/www/web2py/wsgihandler.py", line 29, in <module>
[Tue Jul 18 13:22:12.951548 2017] [wsgi:error] [pid 22268:tid 140002263254784] [remote 192.168.0.1:40920] import gluon.main
[Tue Jul 18 13:22:12.951623 2017] [wsgi:error] [pid 22268:tid 140002263254784] [remote 192.168.0.1:40920] File "/var/www/web2py/gluon/main.py", line 121, in <module>
[Tue Jul 18 13:22:12.951697 2017] [wsgi:error] [pid 22268:tid 140002263254784] [remote 192.168.0.1:40920] load_routes()
[Tue Jul 18 13:22:12.951767 2017] [wsgi:error] [pid 22268:tid 140002263254784] [remote 192.168.0.1:40920] File "/var/www/web2py/gluon/rewrite.py", line 319, in load
[Tue Jul 18 13:22:12.951828 2017] [wsgi:error] [pid 22268:tid 140002263254784] [remote 192.168.0.1:40920] exec(data, symbols)
[Tue Jul 18 13:22:12.951886 2017] [wsgi:error] [pid 22268:tid 140002263254784] [remote 192.168.0.1:40920] File "<string>", line 23, in <module>
[Tue Jul 18 13:22:12.952005 2017] [wsgi:error] [pid 22268:tid 140002263254784] [remote 192.168.0.1:40920] ImportError: No module named fileutils
Commited new fix, error was in routes.py file, caused by changes in newer version of web2py
After deploy, web2py does not work:
Log from apache:
Installed module fileutils
Installed module fileutils
The problem remains