From: steve j. <st...@si...> - 2001-08-01 10:06:29
|
Hi, Earlier tonight I was installing roundup and ran into the following trouble while running python -c 'import test;test.go()' (as specified in the INSTALL.txt): ---begin paste--- [stevej@missdevil roundup-0.2.3]$ python -c 'import test;test.go()' ...............EEEE. ====================================================================== ERROR: testChanges (test.test_db.bsddb3DBTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "test/test_db.py", line 190, in setUp setupSchema(self.db, 1) File "test/test_db.py", line 12, in setupSchema status.create(name="unread") File "roundup/hyperdb.py", line 109, in create newid = str(self.count() + 1) File "roundup/hyperdb.py", line 731, in count return self.db.countnodes(self.classname) File "roundup/backends/back_bsddb3.py", line 123, in countnodes db = cldb or self.getclassdb(classname) File "roundup/backends/back_bsddb3.py", line 72, in getclassdb return bsddb3.btopen(path, 'n') File "/usr/local/lib/python2.1/site-packages/bsddb3/__init__.py", line 149, in btopen d.open(file, _db.DB_BTREE, flags, mode) DBNoSuchFileError: (2, 'No such file or directory') ====================================================================== ERROR: testExceptions (test.test_db.bsddb3DBTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "test/test_db.py", line 190, in setUp setupSchema(self.db, 1) File "test/test_db.py", line 12, in setupSchema status.create(name="unread") File "roundup/hyperdb.py", line 109, in create newid = str(self.count() + 1) File "roundup/hyperdb.py", line 731, in count return self.db.countnodes(self.classname) File "roundup/backends/back_bsddb3.py", line 123, in countnodes db = cldb or self.getclassdb(classname) File "roundup/backends/back_bsddb3.py", line 72, in getclassdb return bsddb3.btopen(path, 'n') File "/usr/local/lib/python2.1/site-packages/bsddb3/__init__.py", line 149, in btopen d.open(file, _db.DB_BTREE, flags, mode) DBNoSuchFileError: (2, 'No such file or directory') ====================================================================== ERROR: testRetire (test.test_db.bsddb3DBTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "test/test_db.py", line 190, in setUp setupSchema(self.db, 1) File "test/test_db.py", line 12, in setupSchema status.create(name="unread") File "roundup/hyperdb.py", line 109, in create newid = str(self.count() + 1) File "roundup/hyperdb.py", line 731, in count return self.db.countnodes(self.classname) File "roundup/backends/back_bsddb3.py", line 123, in countnodes db = cldb or self.getclassdb(classname) File "roundup/backends/back_bsddb3.py", line 72, in getclassdb return bsddb3.btopen(path, 'n') File "/usr/local/lib/python2.1/site-packages/bsddb3/__init__.py", line 149, in btopen d.open(file, _db.DB_BTREE, flags, mode) DBNoSuchFileError: (2, 'No such file or directory') ====================================================================== ERROR: testExceptions (test.test_db.bsddb3ReadOnlyDBTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "test/test_db.py", line 200, in setUp setupSchema(db, 1) File "test/test_db.py", line 12, in setupSchema status.create(name="unread") File "roundup/hyperdb.py", line 109, in create newid = str(self.count() + 1) File "roundup/hyperdb.py", line 731, in count return self.db.countnodes(self.classname) File "roundup/backends/back_bsddb3.py", line 123, in countnodes db = cldb or self.getclassdb(classname) File "roundup/backends/back_bsddb3.py", line 72, in getclassdb return bsddb3.btopen(path, 'n') File "/usr/local/lib/python2.1/site-packages/bsddb3/__init__.py", line 149, in btopen d.open(file, _db.DB_BTREE, flags, mode) DBNoSuchFileError: (2, 'No such file or directory') ---------------------------------------------------------------------- Ran 20 tests in 0.669s FAILED (errors=4) ---end paste--- I'm currently running with a newly installed python 2.1, bsddb3 on a redhat 7.0 machine (I also ripped the python 1.5.2 rpms tonight also) and am wondering if there's something obvious that I missed or something less obvious that I can help track down. thanks in advance and I look forward to poking around with it more, steve -- steve jenson <st...@si...> http://sieve.net/ PGP fingerprint: 79D0 4836 11E4 A43A 0179 FC97 3AE2 008E 1E57 6138 |
From: Richard J. <ri...@op...> - 2001-08-01 13:59:04
|
On Wed, 1 Aug 2001 06:11, you wrote: > [stevej@missdevil roundup-0.2.3]$ python -c 'import test;test.go()' > ...............EEEE. <snip> > ERROR: testExceptions (test.test_db.bsddb3ReadOnlyDBTestCase) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/test_db.py", line 200, in setUp > setupSchema(db, 1) > File "test/test_db.py", line 12, in setupSchema > status.create(name="unread") > File "roundup/hyperdb.py", line 109, in create > newid = str(self.count() + 1) > File "roundup/hyperdb.py", line 731, in count > return self.db.countnodes(self.classname) > File "roundup/backends/back_bsddb3.py", line 123, in countnodes > db = cldb or self.getclassdb(classname) > File "roundup/backends/back_bsddb3.py", line 72, in getclassdb > return bsddb3.btopen(path, 'n') > File "/usr/local/lib/python2.1/site-packages/bsddb3/__init__.py", line > 149, in btopen d.open(file, _db.DB_BTREE, flags, mode) > DBNoSuchFileError: (2, 'No such file or directory') > ---------------------------------------------------------------------- > > I'm currently running with a newly installed python 2.1, bsddb3 on a redhat > 7.0 machine (I also ripped the python 1.5.2 rpms tonight also) and am > wondering if there's something obvious that I missed or something less > obvious that I can help track down. Hrm, I haven't actually used the bsddb3 backend - I'll see about giving it a go tomorrow, but I don't like my chances. Could you try just importing the bsddb3 module and creating a db file in the interpreter? ie. >>> import bsddb3 >>> bsddb3.btopen('foo', 'n') From the traceback, it would seem that the path specified in the btopen call might include a directory that doesn't exit. Try putting a print in line 71 of back_bsddb3.py and see what it's expecting to create the database in (I believe that the path wants to point to a file that it can open, if it's like the other dbms. If a directory needs to be created, we can fairly easily amend the unit test to do so... Richard |
From: steve j. <st...@si...> - 2001-08-01 19:51:34
|
Quoting Richard Jones (ri...@op...): <chop> > > wondering if there's something obvious that I missed or something less > > obvious that I can help track down. > > Hrm, I haven't actually used the bsddb3 backend - I'll see about giving it a > go tomorrow, but I don't like my chances. > > Could you try just importing the bsddb3 module and creating a db file in the > interpreter? ie. > > >>> import bsddb3 > >>> bsddb3.btopen('foo', 'n') yes, it works fine. I get an 8k file named foo that `file` tells me is a BerkeleyDB file. > From the traceback, it would seem that the path specified in the btopen call > might include a directory that doesn't exit. Try putting a print in line 71 > of back_bsddb3.py and see what it's expecting to create the database in (I > believe that the path wants to point to a file that it can open, if it's like > the other dbms. If a directory needs to be created, we can fairly easily > amend the unit test to do so... Here is what I added: if os.path.exists(path): return bsddb3.btopen(path, mode) else: print path return bsddb3.btopen(path, 'n') and the tests: $ python setup.py Running unit tests... WARNING: Python C API version mismatch for module _db: This Python has API version 1010, module _db has version 1007. .............../home/stevej/roundup-0.2.3/_test_dir/nodes.status E/home/stevej/roundup-0.2.3/_test_dir/nodes.status E/home/stevej/roundup-0.2.3/_test_dir/nodes.status E/home/stevej/roundup-0.2.3/_test_dir/nodes.status E. (the API mismatch for module _db bothers me but I know I built it cleanly. Also, since I'm able to create databases, I'm not sure what that problem is all around. fyi, I'm a relative newcomer to the python world) thoughts? steve -- steve jenson <st...@si...> http://sieve.net/ PGP fingerprint: 79D0 4836 11E4 A43A 0179 FC97 3AE2 008E 1E57 6138 |
From: Richard J. <ri...@bi...> - 2001-08-02 00:16:48
|
On Thursday 02 August 2001 05:56, you wrote: > $ python setup.py > Running unit tests... > WARNING: Python C API version mismatch for module _db: > This Python has API version 1010, module _db has version 1007. > .............../home/stevej/roundup-0.2.3/_test_dir/nodes.status > E/home/stevej/roundup-0.2.3/_test_dir/nodes.status > E/home/stevej/roundup-0.2.3/_test_dir/nodes.status > E/home/stevej/roundup-0.2.3/_test_dir/nodes.status > E. Well, that looks OK to me. Looking at the code, the path "/home/stevej/roundup-0.2.3/_test_dir/" must exist - the test case setUp wouldn't work it it didn't... > (the API mismatch for module _db bothers me but I know I built it > cleanly. Also, since I'm able to create databases, I'm not sure what that > problem is all around. fyi, I'm a relative newcomer to the python world) From your first mail: > I'm currently running with a newly installed python 2.1, bsddb3 on a redhat > 7.0 machine (I also ripped the python 1.5.2 rpms tonight also) and am > wondering if there's something obvious that I missed or something less > obvious that I can help track down. The API mismatch bothers me too. If the module was compiled for python 1.5.2 and then installed by python 2.1, you will get that API mismatch message. It is possible that is the cause of the problems. I'm not sure what you mean by "ripped the python 1.5.2 rpms". Also, is there a chance that the _db module (which is an apalling name, tsk on the bsddb3 module writer) is duplicated in another package? That is, what does "find /usr/lib/python2.1 -name _db.so" turn up? It should only find one module. If you've extended your PYTHONPATH, you'd want to check that too for instances of the _db.so file. Richard |
From: steve j. <st...@si...> - 2001-08-02 06:25:01
|
Quoting Richard Jones (ri...@bi...): > On Thursday 02 August 2001 05:56, you wrote: > > Well, that looks OK to me. Looking at the code, the path > "/home/stevej/roundup-0.2.3/_test_dir/" must exist - the test case setUp > wouldn't work it it didn't... yes, the _test_dir directory does exist as you suspect. > The API mismatch bothers me too. If the module was compiled for python 1.5.2 > and then installed by python 2.1, you will get that API mismatch message. It > is possible that is the cause of the problems. This was a problem I had with my PYTHONPATH, which was configured for mojonation, which I was using 1.5.2 for (which I am now recompiling with 2.1). But.. even after cleaning out my PYTHONPATH (to include nothing), I still have those same 4 errors, just no mismatch error. Is there a 'preferred' db library to go with? Granted, roundup should work fine with any libarary that correctly wraps bdb but I'd rather have it up and running sooner rather than later. > I'm not sure what you mean by "ripped the python 1.5.2 rpms". whoops! I lost a word there: "out". I removed the pre-installed python distribution before installing python 2.1. > Also, is there a chance that the _db module (which is an apalling name, tsk > on the bsddb3 module writer) is duplicated in another package? That is, what > does "find /usr/lib/python2.1 -name _db.so" turn up? It should only find one > module. If you've extended your PYTHONPATH, you'd want to check that too for > instances of the _db.so file. I'm only finding the /usr/local/lib/python2.1/site-packages/bsddb3/_db.so cheers, steve -- steve jenson <st...@si...> http://sieve.net/ PGP fingerprint: 79D0 4836 11E4 A43A 0179 FC97 3AE2 008E 1E57 6138 |
From: Richard J. <ri...@bi...> - 2001-08-02 06:32:40
|
On Thursday 02 August 2001 16:29, steve jenson wrote: > Is there a 'preferred' db library to go with? Granted, roundup should work > fine with any libarary that correctly wraps bdb but I'd rather have it up > and running sooner rather than later. Well, it should work with no troubles using either the anydbm or bsddb backends (anydbm will actually use bsddb through dbhash if it's installed, but not bsddb3). Could you try that and let me know how it goes? I will see about getting bsddb3 installed and try it out. I'm using Mandrake 8.0 with the 2.1.1 rpms from the cooker (which don't include bsddb3, unfortunately). I'm not sure what Anthony's using. Richard |