Error No module named copy_reg after upgrading web2py

73 views
Skip to first unread message

José Eloy

unread,
Jan 14, 2016, 7:27:06 PM1/14/16
to web...@googlegroups.com
Hi there!

I upgraded my web2py source folder (2.9.6) with the most recent version (2.13.4), but when I run my application I get the error: No module named copy_reg. Mi app was running well before the upgrade. I´m runnig my app in Windows Server 2008 R2. The upgrade was made using the administrative interface and copy/paste the new version over the old version.

How can I to fix this error?

Regards.

Sorry for my bad english!  I hope you can understand me.

Massimo Di Pierro

unread,
Jan 14, 2016, 11:51:37 PM1/14/16
to web2py-users
which python version? Did you upgrade anything else at the same time? copy_reg is a python module, not a web2py module and you should have it.

Niphlod

unread,
Jan 15, 2016, 2:53:24 AM1/15/16
to web2py-users
@jose: you're coming from a really really old version. Unfortunately the folder structure changed, so it's possible that overwriting left some files that shouldn't be there. Assuming you installed web2py in c:\web2py, please do the following:
- copy your applications/ dir (c:\web2py\applications) to somewhere safe (e.g. your desktop)
- delete everything in the web2py folder (leaving c:\web2py completely empty)
- download the latest version
- decompress the archive in the installation folder (so you have c:\web2py\web2py.py)
- copy your applications/ over, except welcome and admin

@massimo: he's probably in the same pickle other found themselves when upgrading for the different structure. IMHO "upgrade now" button needs to be dropped until a solid upgrade scheme is found: it has been discussed over and over and a decision was never made. Finally, we should really look into releasing web2py to pypi.

Massimo Di Pierro

unread,
Jan 15, 2016, 7:51:24 AM1/15/16
to web2py-users
I agree with web2py in pipy. I think removing the upgrade button would not be helpful. Users of old version would still have a broken button.

Niphlod

unread,
Jan 15, 2016, 7:57:45 AM1/15/16
to web2py-users
On Friday, January 15, 2016 at 1:51:24 PM UTC+1, Massimo Di Pierro wrote:
I agree with web2py in pipy. I think removing the upgrade button would not be helpful. Users of old version would still have a broken button.


Ehm.... "Yeay, let's not remove a broken thing because previous builds included the same broken thing"   ? ? ? 

Massimo Di Pierro

unread,
Jan 17, 2016, 7:52:23 PM1/17/16
to web2py-users
it is not broken today. We can replace it with something better. Until then we can be careful and make sure it works. And even if it does not work 100% of the times, it is better than nothing.

Simon Ashley

unread,
Feb 5, 2016, 10:57:00 PM2/5/16
to web2py-users
Having a similar issue this morning.

OS: windows 10.
Python distribution: Anaconda
Have an older project under version 2.9.11 / 214.09.15.23.35.11 which runs OK

Have downloaded a fresh copy of web2py from source this morning, and installed in a freshly created directory (c:\w2p_12 rather than c:\web2py).
Copied the application from the original folder to c:\w2p_12\applications\

Version

web2py™Version 2.13.4-stable+timestamp.2015.12.26.04.59.39
PythonPython 2.7.10: C:\Anaconda\pythonw.exe (prefix: C:\Anaconda)

Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
Traceback (most recent call last):
File "C:\w2p_12\gluon\restricted.py", line 227, in restricted
exec ccode in environment
File "C:/w2p_12/applications/csm02_4/models/db_ship.py", line 204, in <module>
db.charge.id.writable = db.charge.id.readable = False
File "C:\Anaconda\lib\site-packages\pydal\base.py", line 920, in __getattr__
return self.lazy_define_table(tablename, *fields, **args)
File "C:\Anaconda\lib\site-packages\pydal\base.py", line 873, in lazy_define_table
polymodel=polymodel)
File "C:\Anaconda\lib\site-packages\pydal\adapters\base.py", line 500, in create_table
sql_fields_old = pickle.load(tfile)
File "C:\w2p_12\gluon\custom_import.py", line 95, in custom_importer
return base_importer(pname, globals, locals, fromlist, level)
ImportError: No module named copy_reg
Reply all
Reply to author
Forward
0 new messages