I think I narrowed the problem down to activesync. import tools worked fine, and I was able to actually import from gluon.tools in web2py. But I happened to notice that when I disconnect the pda from my laptop, browse to a couple pages in our web2py project, then reconnect, errors start occuring. Sometimes the errors stop, other times the pythonce shell needs to be restarted. The errors I've seen are all MemoryErrors.
One of them had an interesting callback: Windows said it was a DNS error: S'Traceback (most recent call last):\n File "\\Storage Card\ \web2py_src\\gluon\\main.py", line 425, in wsgibase\n serve_controller(request, response, session)\n File "\\Storage Card\ \web2py_src\\gluon\\main.py", line 187, in serve_controller\n run_models_in(environment)\n File "\\Storage Card\\web2py_src\\gluon\ \compileapp.py", line 351, in run_models_in\n restricted(code, environment, layer)\n File "\\Storage Card\\web2py_src\\gluon\ \restricted.py", line 196, in restricted\n raise RestrictedError(layer, code, \'\', environment)\n File "\\Storage Card \\web2py_src\\gluon\\restricted.py", line 118, in __init__\n self.traceback = traceback.format_exc()\n File "C:\\development\ \opensource\\PythonCE\\Trunk\\Python-2.5-wince-chris\\Lib\ \traceback.py", line 236, in format_exc\n File "C:\\development\ \opensource\\PythonCE\\Trunk\\Python-2.5-wince-chris\\Lib\ \traceback.py", line 142, in format_exception\n File "C:\\development\ \opensource\\PythonCE\\Trunk\\Python-2.5-wince-chris\\Lib\ \traceback.py", line 76, in format_tb\n File "C:\\development\ \opensource\\PythonCE\\Trunk\\Python-2.5-wince-chris\\Lib\ \traceback.py", line 101, in extract_tb\n File "C:\\development\ \opensource\\PythonCE\\Trunk\\Python-2.5-wince-chris\\Lib\ \linecache.py", line 14, in getline\n File "C:\\development\ \opensource\\PythonCE\\Trunk\\Python-2.5-wince-chris\\Lib\ \linecache.py", line 40, in getlines\n File "C:\\development\ \opensource\\PythonCE\\Trunk\\Python-2.5-wince-chris\\Lib\ \linecache.py", line 129, in updatecache\nMemoryError\n' yikes! On Nov 11, 4:29 pm, mdipierro <[email protected]> wrote: > Now I am very confused. > > can you now try simply import tools.py? > > If you still get the Memory error can you comment: > > urllib2.install_opener(urllib2.build_opener(urllib2.HTTPCookieProcessor())) > > in tools and try import it again? > > On Nov 11, 3:23 pm,mindsynch<[email protected]> wrote: > > > I just ran these commands from pythonce's idle, and they all worked. > > The only hiccup was when running 'from storage import Storage, > > StorageList, Settings, Messages', it said 'No handlers could be found > > for logger "web2py"', but it still seemed to import it. > > > On Nov 11, 12:48 am, mdipierro <[email protected]> wrote: > > > > Can you please run these tests for me? > > > > cd into the gluon folder and run python from there (or vice versa). > > > From the python shell run > > > > from contenttype import contenttype > > > from storage import Storage, StorageList, Settings, Messages > > > from validators import * > > > from html import * > > > from sqlhtml import * > > > from http import * > > > from utils import web2py_uuid > > > > import base64 > > > import cPickle > > > import datetime > > > import thread > > > import logging > > > import sys > > > import os > > > import re > > > import time > > > import smtplib > > > import urllib > > > import urllib2 > > > import Cookie > > > > from email import * > > > > import serializers > > > import contrib.simplejson as simplejson > > > from sql import Field > > > > logger = logging.getLogger("web2py") > > > > When do you get the MemoryError? > > > > On Nov 8, 9:46 pm,mindsynch<[email protected]> wrote: > > > > > I just tried to import Mail, Auth, Crud, and Service separately, but > > > > each time they gave a MemoryError exception. hmmm interesting! > > > > > On Nov 8, 9:08 pm, mdipierro <[email protected]> wrote: > > > > > > admin should no longer import MARKDOWN but MARKMIN and this will fix > > > > > that problem. Can you try from gluon.tools import Mail, Auth,Crud, > > > > > Service, separately and see what it fails? > > > > > > Massimo > > > > > > On Nov 8, 7:14 pm,mindsynch<[email protected]> wrote: > > > > > > > I got this basically working with the following setup: > > > > > > > web2py source, Version 1.88.2 > > > > > > PythonCE-2.5-20061219-source.zip > > > > > > fromhttp://sourceforge.net/projects/pythonce/files/ > > > > > >WindowsMobile 5 > > > > > > > web2py starts up ok (logger complains about not finding a handle for > > > > > > "web2py") > > > > > > I can get a sqllite 3 database running, define tables, insert and > > > > > > select, html is rendered, etc. > > > > > > > There are 2 places where I'm getting a MemoryError exception. The > > > > > > first is when running 'from gluon.tools import *' in db.py. > > > > > > The second is when an error ticket is generated: clicking on it > > > > > > generates another error ticket in the admin package when it tries to > > > > > > run 'from markdown2 import *' in the file > > > > > > '\\web2py_src\\gluon\\contrib > > > > > > \\markdown\\__init__.py' > >

