나는 3.0으로 포팅 된 2.5 모듈을 얻고 자 노력 해왔다. 클래스 "빌더"의 초기화로 있습니다3.0의 "hashlib"모듈에 관한 문제
def __init__(self, **options):
self._verifyOptions(options)
self._options = options
self._initDigest()
self._initBuildNames()
self._methods = []
하지만 오류가 발생 : 나는했습니다
Traceback (most recent call last):
File "<pyshell#5>", line 5, in <module>
""", language="Cee")
File "C:\Python30\lib\site-packages\PyInline\__init__.py", line 31, in build
b = m.Builder(**args)
File "C:\Python30\lib\site-packages\PyInline\Cee.py", line 17, in __init__
self._initDigest()
File "C:\Python30\lib\site-packages\PyInline\Cee.py", line 27, in _initDigest
digester.update(self._options.get('code'))
TypeError: object supporting the buffer API required
: 그 역 추적으로이
def _initDigest(self):
import os, sys, hashlib
digester = hashlib.md5()
digester.update(self._options.get('code'))
self._digest = digester.hexdigest()
2to3을 통해 실행 시키지만, 실제로는 실행되지 않습니다. 늘어나는만큼 내가 말할 수있는, 업데이트 함수는 인수가 바이트/버퍼의 형태로 기대하고 있지만 그것을 변환하는 여러 가지 방법을 시도하고 성공하지 못했습니다.
항상 그렇듯이 도움을 주시면 대단히 감사하겠습니다. :)
이 오류를 성공적으로 수정했으며이 작업에 대한 추가 정보를 얻었습니다. 축하해 주셔서 감사합니다. –