Bugs item #1149413, was opened at 2005-02-22 14:14 Message generated for change (Comment added) made by greg You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1149413&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.3 >Status: Closed Resolution: None Priority: 5 Submitted By: Martin Mokrejs (mmokrejs) Assigned to: Gregory P. Smith (greg) Summary: bsddb: bug with 'n' flag Initial Comment: Where: http://docs.python.org/lib/module-bsddb.html You say there: <quote> btopen( filename[, flag[, mode[, btflags[, cachesize[, maxkeypage[, minkeypage[, psize[, lorder]]]]]]]]) </quote> the word psize should be replaced with pgsize. An example would help: >>> d = bsddb.btopen(None, "c", cachesize=768000, pgsize=65536) >>> d = bsddb.btopen(None, "n", cachesize=768000, pgsize=65536) Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/bsddb/__init__.py", line 201, in btopen flags = _checkflag(flag, file) File "/usr/lib/python2.3/bsddb/__init__.py", line 249, in _checkflag if os.path.isfile(file): File "/usr/lib/python2.3/posixpath.py", line 200, in isfile st = os.stat(path) TypeError: coercing to Unicode: need string or buffer, NoneType found >>> The latter is I believe possibly a bug in the python wrapper not handling 'n' properly. ---------------------------------------------------------------------- >Comment By: Gregory P. Smith (greg) Date: 2006-04-12 13:17 Message: Logged In: YES user_id=413 fix for the 'n' flag not working with a filename of None committed (with a test case). svn rev 45318. ---------------------------------------------------------------------- Comment By: A.M. Kuchling (akuchling) Date: 2005-06-08 14:57 Message: Logged In: YES user_id=11375 I've fixed the documentation to use the right parameter name; thanks for reporting this! The example you give doesn't work for me: it reports 'bsddb._db.DBInvalidArgError: (22, 'Invalid argument -- set_cachesize: method meaningless in shared environment')' with the current CVS head. Removing the cachesize argument makes it work. The 'n' problem does seem to be a bug; the code should check that file is not None before doing os.file.exists(). Reassigning and reclassifying the bug. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1149413&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com