Well,
obviously, you will now need to install the corresponding Python-3 modules,
like dateutil, lxml, etc (see requirements.txt) - you will have had them with
your Python-2 installation, but they do not automatically upgrade when you
switch the Python version.
Dominic
tisdag 13 juli 2021 kl. 07:12:38 CEST skrev Anand Kulkarni:
> Hello Dominic,
>
> I have updated python fron 2.7 to 3.7, But now I'm facing ImportError: No
> module named applications.eden.modules.dateutil.
>
>
> root@GLBLRSVPSAHA01:/home/web2py# python --version
> Python 3.7.3
> root@GLBLRSVPSAHA01:/home/web2py# python web2py.py -S eden -M -R
> applications/eden/static/scripts/tools/compile.py
> web2py Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2021
> Version 2.21.1-stable+timestamp.2020.11.27.18.21.43
> Database drivers available: sqlite3, imaplib, pymysql, pyodbc
> ERROR: python-dateutil module needed for date handling
> Traceback (most recent call last):
> File "/home/web2py/gluon/custom_import.py", line 78, in custom_importer
> result = sys.modules[modules_prefix]
> KeyError: 'applications.eden.modules.dateutil'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "/home/web2py/gluon/restricted.py", line 219, in restricted
> exec(ccode, environment)
> File "applications/eden/models/00_db.py", line 87, in <module>
> import s3 as s3base
> File "/home/web2py/gluon/custom_import.py", line 74, in custom_importer
> modules_prefix, globals, locals, (itemname,), level)
> File "/home/web2py/applications/eden/modules/s3/__init__.py", line 45, in
> <module>
> from .s3validators import *
> File "/home/web2py/gluon/custom_import.py", line 87, in custom_importer
> return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
> File "/home/web2py/applications/eden/modules/s3/s3validators.py", line
> 73, in <module>
> from .s3datetime import S3DateTime
> File "/home/web2py/gluon/custom_import.py", line 87, in custom_importer
> return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
> File "/home/web2py/applications/eden/modules/s3/s3datetime.py", line 49,
> in <module>
> import dateutil
> File "/home/web2py/gluon/custom_import.py", line 80, in custom_importer
> raise ImportError("No module named %s" % modules_prefix)
> ImportError: No module named applications.eden.modules.dateutil
>
> Thanks & Regards,
> Anand A Kulkarni.
>
> On Monday, July 12, 2021 at 9:52:52 PM UTC+5:30 Dominic wrote:
>
https://groups.google.com/d/msgid/sahana-eden/314f79b8-b081-4cc4-b0eb-5e80f
> d0e290dn%
40googlegroups.com.