>python -c "from sqlpython.mysqlpy import run; run()"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\Apps\Python26\lib\site-packages\sqlpython\__init__.py",
line 1, in <module>
import mysqlpy
File "D:\Apps\Python26\lib\site-packages\sqlpython\mysqlpy.py", line
11, in <module>
from sqlpyPlus import *
File "D:\Apps\Python26\lib\site-packages\sqlpython\sqlpyPlus.py",
line 26, in <module>
import sys, os, re, sqlpython, pyparsing, re, completion
File "D:\Apps\Python26\lib\site-packages\sqlpython\sqlpython.py",
line 12, in <module>
import pyparsing, connections
File "D:\Apps\Python26\lib\site-packages\sqlpython\connections.py",
line 216, in <module>
class DatabaseInstance(object):
File "D:\Apps\Python26\lib\site-packages\sqlpython\connections.py",
line 222, in DatabaseInstance
pickledir = os.path.join(os.getenv('HOME'), '.sqlpython')
File "D:\Apps\Python26\lib\ntpath.py", line 96, in join
assert len(path) > 0
TypeError: object of type 'NoneType' has no len()
This is because I do not have a HOME environment variable (a normal
situation on Windows).
It looks like it's only needed for the PICKLE command. Can I suggest
that (1) this defaults to the current directory if HOME isn't set (I'd
prefer it if it defaulted to the current dir always, but backward
compatilibility probably makes that impossible), (2) there's a
specific environment variable (say, SQLPYTHON_PICKLEDIR) that
overrides %HOME%\.sqlpython, and (3) there's the option for the user
to specify a specific file to pickle to in the pickle command?
I can't be sure these suggestions are appropriate as there's no
documentation on the pickle command, so I'm sort of guessing how it
might be used. But at the very least, it would be better to disable
the one command than to crash sqlpython in this situation.
Paul
--
You received this message because you are subscribed to the Google Groups "sqlpython" group.
To post to this group, send email to sqlp...@googlegroups.com.
To unsubscribe from this group, send email to sqlpython+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sqlpython?hl=en.