Missing _bssd in Python 2.4
I compiled and installed python 2.4 on Redhat Linux using default options but don't seem to be getting _bsddb. I get an error message that _bssd cannot be imported. Does anybody know why this might happen? Do I need to do any special customization or install any other software? Thanks, -Jalil -- http://mail.python.org/mailman/listinfo/python-list
Re: Missing _bssd in Python 2.4
I actually installed BerkeleyBD4.0 and commented out some sections of Modules/Setup that I found related to this. I got the _bsddb.o in the build environment but I still get the same error from bsddb/__init.py__ that it cannot import _bsddb. Anything I am missing? Where should this _bsddb go exactly? Is it an .so file? Thanks, -JF Martin v. Löwis wrote: > [EMAIL PROTECTED] wrote: > > I compiled and installed python 2.4 on Redhat Linux using default > > options but don't seem to be getting _bsddb. I get an error message > > that _bssd cannot be imported. > > > > Does anybody know why this might happen? Do I need to do any special > > customization or install any other software? > > You need to install the bsddb header files and development libraries > when building Python from source. > > Regards, > Martin -- http://mail.python.org/mailman/listinfo/python-list
Exception from bsddb module
I am using Python 2.4 and get this exception when running my mod_python
application. This used to work in my older environment.
Any ideas on how I can debug this issue?
-Jalil
Mod_python error: "PythonHandler mod_python.psp"
Traceback (most recent call last):
File "/usr/local/lib/python2.4/site-packages/mod_python/apache.py",
line 299, in HandlerDispatch
result = object(req)
File "/usr/local/lib/python2.4/site-packages/mod_python/psp.py", line
297, in handler
p.run()
File "/usr/local/lib/python2.4/site-packages/mod_python/psp.py", line
191, in run
session = Session.Session(req)
File "/usr/local/lib/python2.4/site-packages/mod_python/Session.py",
line 389, in Session
timeout=timeout, lock=lock)
File "/usr/local/lib/python2.4/site-packages/mod_python/Session.py",
line 294, in __init__
timeout=timeout, lock=lock)
File "/usr/local/lib/python2.4/site-packages/mod_python/Session.py",
line 124, in __init__
if self.load():
File "/usr/local/lib/python2.4/site-packages/mod_python/Session.py",
line 185, in load
dict = self.do_load()
File "/usr/local/lib/python2.4/site-packages/mod_python/Session.py",
line 315, in do_load
dbm = self._get_dbm()
File "/usr/local/lib/python2.4/site-packages/mod_python/Session.py",
line 302, in _get_dbm
result = self._dbmtype.open(self._dbmfile, 'c')
File "/usr/local/lib/python2.4/anydbm.py", line 83, in open
return mod.open(file, flag, mode)
File "/usr/local/lib/python2.4/dbhash.py", line 16, in open
return bsddb.hashopen(file, flag, mode)
File "/usr/local/lib/python2.4/bsddb/__init__.py", line 285, in
hashopen
e = _openDBEnv()
File "/usr/local/lib/python2.4/bsddb/__init__.py", line 339, in
_openDBEnv
e.open('.', db.DB_PRIVATE | db.DB_CREATE | db.DB_THREAD |
db.DB_INIT_LOCK | db.DB_INIT_MPOOL)
DBError: (15344, 'Unknown error 15344')
--
http://mail.python.org/mailman/listinfo/python-list
Encoding Questions
1. I download a page in python using urllib and now want to convert and keep it as utf-8? I already know the original encoding of the page. What calls should I make to convert the encoding of the page to utf8? For example, let's say the page is encoded in gb2312 (simple chinese) and I want to keep it in utf-8? 2. Is this a good approach? Can I keep any pages in any languages in this way and return them when requested using utf-8 encoding? 3. Does python 2.4 support all encodings? By the way, I have set my default encoding in Python to utf8. I appreciate any help. -JF -- http://mail.python.org/mailman/listinfo/python-list
Re: Encoding Questions
thanks for the replies. As for why I set my default encoding to utf-8 in python, I did it a while ago and I think I did it because when I was reading some strings from database in utf-8 it raised errors b/c there were some chars it could recongnize in standard encoding. When I made the change, the error didn't happen anymore. Does it make sense? -JF -- http://mail.python.org/mailman/listinfo/python-list
