나는 macports에서 python 3.1.4를 실행 중이고 여기서 shelve 모듈을 사용하려고합니다. 나는 다른 dev에 그것을 성공적으로 사용할 수있다. 기계 (다른 운영 체제 등) 그래서 내가 무엇을 잘못하고 있을지 모르겠다 ...10.5.8의 Macports에서 설치된 Python 3.1 - 쉘브 오류 (버그 여부)
어떤 생각이나 제안을 주시면 감사하겠습니다! 여기
이 오류입니다 : (나는 오류 메시지를 검색하지만 정보를 찾을 수 없습니다 "dbm.error DB 유형을 판별 할 수 없습니다"- 나는 심지어는 도움이 될 수 있는지 확인하기 위해 protocl = 2를 강제로하려했지만Python 3.1.4 (default, Oct 7 2011, 15:58:53)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
>>> import shelve
>>> a = [1, 2, 3]
>>> locker = shelve.open('myshelf',protocol=2)
>>> locker['a'] = a
>>> locker.close()
>>> exit()
Python 3.1.4 (default, Oct 7 2011, 15:58:53)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
>>> import shelve
>>> locker = shelve.open('myshelf',protocol=2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/shelve.py", line 231, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/shelve.py", line 215, in __init__
Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/dbm/__init__.py", line 84, in open
raise error[0]("db type could not be determined")
dbm.error: db type could not be determined
나는 이것을 위해 문제점을 열었습니다 : https://trac.macports.org/ticket/32010 –
흠, 나는 희망을 가졌습니다. 이것이 답이 아니라는 것입니다. 나는 Macports에서 설치 한 후에 파이썬 3.1과 함께 선반을 사용하려고 시도한 첫 번째 사람이라고 생각하기가 어렵지만 거기에 가서 ... –
임시 해결 방법에 대한 의견이 있으십니까? 나는 원숭이 패치를 시작하고 싶지 않지만, 적어도 선반 호출에 매개 변수를 전달하여 (적어도)이로드 블록을 통과하게하는 다른 DB를 사용하도록 강제 할 수 있다면 ... –