Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shelve.open/bsddb.hashopen raise bsddb.db.DBNoSuchFileError: (2, 'No such file or directory') with Chinese Path #53640

Closed
wjm251 mannequin opened this issue Jul 28, 2010 · 1 comment
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@wjm251
Copy link
Mannequin

wjm251 mannequin commented Jul 28, 2010

BPO 9394
Superseder
  • bpo-9393: shelve.open/bsddb.hashopen exception with unicode paths
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2010-07-28.09:28:42.820>
    created_at = <Date 2010-07-28.09:16:48.254>
    labels = ['type-bug', 'library']
    title = "shelve.open/bsddb.hashopen raise bsddb.db.DBNoSuchFileError: (2, 'No such file or directory') with Chinese Path"
    updated_at = <Date 2010-07-28.09:28:42.819>
    user = 'https://bugs.python.org/wjm251'

    bugs.python.org fields:

    activity = <Date 2010-07-28.09:28:42.819>
    actor = 'eric.araujo'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-07-28.09:28:42.820>
    closer = 'eric.araujo'
    components = ['Library (Lib)']
    creation = <Date 2010-07-28.09:16:48.254>
    creator = 'wjm251'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 9394
    keywords = []
    message_count = 1.0
    messages = ['111780']
    nosy_count = 1.0
    nosy_names = ['wjm251']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '9393'
    type = 'behavior'
    url = 'https://bugs.python.org/issue9394'
    versions = ['Python 2.5']

    @wjm251
    Copy link
    Mannequin Author

    wjm251 mannequin commented Jul 28, 2010

    Windows XP Simple Chinese Version
    in python2.5,Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32
    I have a directory "D:\你好新建文件夹"
    my code is as follows:
    #--------------------------------------

    temppath = u"D:\\你好新建文件夹\\a"
    import shelve
    cache = shelve.open(temppath, 'c')
    #

    when use temppath.encode("utf-8"),it works,
    but in python2.6,temppath can works properly

    but I got a Error with such traceback

    Traceback (most recent call last):
      File "D:\eclipse_workspace\pytest\src\test.py", line 5, in <module>
        cache = shelve.open(temppath, 'c')
      File "D:\eclipse_workspace\omstarv5r6\linksvn\src\UNPPython\pywindows\Lib\shelve.py", line 225, in open
        return DbfilenameShelf(filename, flag, protocol, writeback)
      File "D:\eclipse_workspace\omstarv5r6\linksvn\src\UNPPython\pywindows\Lib\shelve.py", line 209, in __init__
        Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
      File "D:\eclipse_workspace\omstarv5r6\linksvn\src\UNPPython\pywindows\Lib\anydbm.py", line 83, in open
        return mod.open(file, flag, mode)
      File "D:\eclipse_workspace\omstarv5r6\linksvn\src\UNPPython\pywindows\Lib\dbhash.py", line 16, in open
        return bsddb.hashopen(file, flag, mode)
      File "D:\eclipse_workspace\omstarv5r6\linksvn\src\UNPPython\pywindows\Lib\bsddb\__init__.py", line 310, in hashopen
        d.open(file, db.DB_HASH, flags, mode)
    bsddb.db.DBNoSuchFileError: (2, 'No such file or directory')

    @wjm251 wjm251 mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Jul 28, 2010
    @merwok merwok closed this as completed Jul 28, 2010
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant