I mean if I create a function  foobar in  default.py and have foobar call 
the function that is in the scheduler (that is normally run by the task), 
To run this  I type app/default/foobar in the browser.The function then 
runs fine, and does see the dropbox module.

So web2py is correctly using python2.6, and the scheduler is 'started' 
correctly with python2.6 


Here is some more detail.

The error is
Traceback (most recent call last):
  File "/opt/web-apps/web2py/gluon/scheduler.py", line 238, in executor
    result = dumps(_function(*args, **vars))
  File "applications/new_spin2/models/scheduler.py", line 45, in save_sqlite
    client=dropbox_client()
  File "applications/new_spin2/modules/myutils.py", line 198, in 
dropbox_client
    from dropbox import client, rest, session
  File "/opt/web-apps/web2py/gluon/custom_import.py", line 86, in 
custom_importer
    return base_importer(pname, globals, locals, fromlist, level)
  File "/opt/web-apps/web2py/gluon/custom_import.py", line 125, in __call__
    result = NATIVE_IMPORTER(name, globals, locals, fromlist, level)
ImportError: No module named dropbox



Myutils contains dropbox_client

def dropbox_client():
    from dropbox import client, rest, session
    from gluon import current
    token=current.session.token
etc


def save_sqlite():
    import os
...
    client=dropbox_client()


Thanks for your time on this Niphlod


Peter

 

-- 
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