tried, modify the code but have another error : ModuleNotFoundError, any 
idea?
*static/scripts/python/mover.py*
import site_scheduler
import site_scrape
def main():
    URI = 'mysql://root:mysql@localhost/site'
    other_db = DAL(URI, auto_import = True)
    print ('exporting data')
    db.export_to_csv_file(open('tmp.csv', 'wb') )
    print ('importing data')
    other_db.import_from_csv_file(open('tmp.csv', 'rb') )
    other_db.commit()
    print ('done!')

$ python ~/python/web2py/web2py.py -S site -M -R ~/python/web2py/
applications/site/static/scripts/python/mover.py
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2018
Version 2.16.1-stable+timestamp.2017.11.14.05.54.25
Database drivers available: sqlite3, imaplib, pymysql, pyodbc, pg8000
Traceback (most recent call last):
  File "/Users/sugizo/python/web2py/gluon/custom_import.py", line 77, in 
custom_importer
    return NATIVE_IMPORTER(oname, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'site_scheduler'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/sugizo/python/web2py/gluon/custom_import.py", line 77, in 
custom_importer
    return NATIVE_IMPORTER(oname, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'site_scrape'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/sugizo/python/web2py/gluon/custom_import.py", line 77, in 
custom_importer
    return NATIVE_IMPORTER(oname, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'bs4'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/sugizo/python/web2py/gluon/custom_import.py", line 98, in 
custom_importer
    return base_importer(pname, globals, locals, fromlist, level)
  File "/Users/sugizo/python/web2py/gluon/custom_import.py", line 137, in 
__call__
    result = NATIVE_IMPORTER(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'applications.site.modules.bs4'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/sugizo/python/web2py/gluon/custom_import.py", line 102, in 
custom_importer
    return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'bs4'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/sugizo/python/web2py/gluon/custom_import.py", line 88, in 
custom_importer
    modules_prefix, globals, locals, [itemname], level)
  File "/Users/sugizo/python/web2py/gluon/custom_import.py", line 137, in 
__call__
    result = NATIVE_IMPORTER(name, globals, locals, fromlist, level)
  File 
"/Users/sugizo/python/web2py/applications/site/modules/site_scrape.py", 
line 5, in <module>
    from bs4 import BeautifulSoup
  File "/Users/sugizo/python/web2py/gluon/custom_import.py", line 104, in 
custom_importer
    raise ImportError(e1, import_tb)  # there an import error in the module
ImportError: (ModuleNotFoundError("No module named 
'applications.site.modules.bs4'",), <traceback object at 0x104dafe88>)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/sugizo/python/web2py/gluon/custom_import.py", line 102, in 
custom_importer
    return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'site_scrape'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/sugizo/python/web2py/gluon/custom_import.py", line 88, in 
custom_importer
    modules_prefix, globals, locals, [itemname], level)
  File "/Users/sugizo/python/web2py/gluon/custom_import.py", line 137, in 
__call__
    result = NATIVE_IMPORTER(name, globals, locals, fromlist, level)
  File 
"/Users/sugizo/python/web2py/applications/site/modules/site_scheduler.py", 
line 10, in <module>
    import site_scrape
  File "/Users/sugizo/python/web2py/gluon/custom_import.py", line 104, in 
custom_importer
    raise ImportError(e1, import_tb)  # there an import error in the module
ImportError: (ImportError(ModuleNotFoundError("No module named 
'applications.site.modules.bs4'",), <traceback object at 0x104dafe88>), 
<traceback 
object at 0x104daff88>)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/sugizo/python/web2py/gluon/custom_import.py", line 102, in 
custom_importer
    return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'site_scheduler'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/sugizo/python/web2py/gluon/restricted.py", line 219, in 
restricted
    exec(ccode, environment)
  File "applications/site/models/db.py", line 155, in <module>
    import site_scheduler
  File "/Users/sugizo/python/web2py/gluon/custom_import.py", line 104, in 
custom_importer
    raise ImportError(e1, import_tb)  # there an import error in the module
ImportError: (ImportError(ImportError(ModuleNotFoundError("No module named 
'applications.site.modules.bs4'",), <traceback object at 0x104dafe88>), 
<traceback 
object at 0x104daff88>), <traceback object at 0x10421b288>)

thx and best regards,
stifan

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

Reply via email to