I'm moving my home development to  
 2.21.1-stable+timestamp.2020.11.28.04.10.44 after years of 2.14.6 and only 
dipping my toes into later versions.

The print -> print() and except E,e -> except E(e) was pretty minor, but 
I'm running into import errors for my app's module code.  I tried the fully 
qualified technique as in
<URL:https://groups.google.com/g/web2py/c/LEXaFGq7q_k/m/rXag1_fGEgAJ>
which looks like
import sys,datetime,os,os.path,shutil,subprocess,urllib2,re
from gluon import *
import logging
from applications.badlist.modules.restuff import restuff

but I'm still getting

Traceback (most recent call last):
File "C:\Users\Dave\web2py_win\web2py_win_py27\web2py\gluon\restricted.py", 
line 
219, in restricted
exec(ccode, environment)
File 
"C:/Users/Dave/web2py_win/web2py_win_py27/web2py/applications/myapp/controllers/default.py"
 
<http://127.0.0.1:8000/admin/edit/badlist/controllers/default.py>, line 13, in 
<module>
import restuff
File 
"C:\Users\Dave\web2py_win\web2py_win_py27\web2py\gluon\custom_import.py", line 
74, in custom_importer
modules_prefix, globals, locals, (itemname,), level)
File 
"C:\Users\Dave\web2py_win\web2py_win_py27\web2py\gluon\custom_import.py", line 
109, in __call__
result = NATIVE_IMPORTER(name, globals, locals, fromlist, level)
File "applications\badlist\modules\restuff.py", line 2, in <module>
import Cookie
File 
"C:\Users\Dave\web2py_win\web2py_win_py27\web2py\gluon\custom_import.py", line 
87, in custom_importer
return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
File 
"c:\users\nico\appdata\local\temp\pip-unpacked-wheel-tf9p4e\PyInstaller\loader\pyimod03_importers.py",
 
line 157, in load_module
File 
"c:\users\nico\appdata\local\temp\pip-unpacked-wheel-tf9p4e\PyInstaller\loader\pyimod03_importers.py",
 
line 391, in load_module
File "Cookie.py", line 217, in <module>
File 
"C:\Users\Dave\web2py_win\web2py_win_py27\web2py\gluon\custom_import.py", line 
87, in custom_importer
return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
File 
"c:\users\nico\appdata\local\temp\pip-unpacked-wheel-tf9p4e\PyInstaller\loader\pyimod03_importers.py",
 
line 157, in load_module
File 
"c:\users\nico\appdata\local\temp\pip-unpacked-wheel-tf9p4e\PyInstaller\loader\pyimod03_importers.py",
 
line 391, in load_module
File "warnings.py", line 6, in <module>
File 
"C:\Users\Dave\web2py_win\web2py_win_py27\web2py\gluon\custom_import.py", line 
87, in custom_importer
return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
File 
"c:\users\nico\appdata\local\temp\pip-unpacked-wheel-tf9p4e\PyInstaller\loader\pyimod03_importers.py",
 
line 157, in load_module
File 
"c:\users\nico\appdata\local\temp\pip-unpacked-wheel-tf9p4e\PyInstaller\loader\pyimod03_importers.py",
 
line 391, in load_module
File "linecache.py", line 9, in <module>
File 
"C:\Users\Dave\web2py_win\web2py_win_py27\web2py\gluon\custom_import.py", line 
87, in custom_importer
return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
File 
"c:\users\nico\appdata\local\temp\pip-unpacked-wheel-tf9p4e\PyInstaller\loader\pyimod03_importers.py",
 
line 157, in load_module
File 
"c:\users\nico\appdata\local\temp\pip-unpacked-wheel-tf9p4e\PyInstaller\loader\pyimod03_importers.py",
 
line 391, in load_module
File "os.py", line 120, in <module>
File 
"C:\Users\Dave\web2py_win\web2py_win_py27\web2py\gluon\custom_import.py", line 
87, in custom_importer
return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
ImportError: No module named path
Error snapshot  
<http://127.0.0.1:8000/admin/default/ticket/badlist/127.0.0.1.2020-12-31.13-58-04.a5c2c7d0-9ea3-4d31-875c-b10800e04c9f#>

<type 'exceptions.ImportError'>(No module named path)
I can skip this for now by isolating the functions that use the module, but 
this will soon be a big problem.  Suggestions?

(Google Groups dropped the "code block" button?  Pfui!

Dave
/dps

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/29f27a10-e329-4a05-8ec8-3b58abccfe93n%40googlegroups.com.

Reply via email to