Copy reg is a python module. Can you import it from the normal python shell?

On Tuesday, 22 July 2014 06:05:06 UTC-5, Richard wrote:
>
> Hi,
>
> I have an issue with adjusting the auth tables resulting in a custom 
> import and an error that copy_reg can not be imported.
>
> The error trace is:
>
> Traceback (most recent call last):
>   File "/home4/mamplcom/public_html/cgi-bin/gluon/restricted.py", line 220, 
> in restricted
>     exec ccode in environment
>   File "/home4/mamplcom/public_html/cgi-bin/applications/im/models/db.py" 
> <https://www.mampl.com/admin/default/edit/im/models/db.py>, line 74, in 
> <module>
>     auth.define_tables(username=False, signature=False)
>   File "/home4/mamplcom/public_html/cgi-bin/gluon/tools.py", line 1784, in 
> define_tables
>     format='%(first_name)s %(last_name)s (%(id)s)'))
>   File "/home4/mamplcom/public_html/cgi-bin/gluon/dal.py", line 8226, in 
> define_table
>     table = self.lazy_define_table(tablename,*fields,**args)
>   File "/home4/mamplcom/public_html/cgi-bin/gluon/dal.py", line 8263, in 
> lazy_define_table
>     polymodel=polymodel)
>   File "/home4/mamplcom/public_html/cgi-bin/gluon/dal.py", line 1125, in 
> create_table
>     sql_fields_old = pickle.load(tfile)
>   File "/home4/mamplcom/public_html/cgi-bin/gluon/custom_import.py", line 92, 
> in custom_importer
>     return base_importer(pname, globals, locals, fromlist, level)
> ImportError: No module named copy_reg
>
> I can import copy_reg from the python prompt and adding the import copy reg 
> from Dal.py (suggested in a thread by Massimo) has no effect.
>
> I use Python 2.7.8.
>
> Any clu would be helpfull.
>
> Richard
>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to