You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[09:54:07] [] Analyze .git/HEAD
None
Traceback (most recent call last):
File "git_extract.py", line 300, in
Git.git_init()
File "git_extract.py", line 289, in git_init
self.git_head()
File "git_extract.py", line 167, in git_head
refs = re.findall(r'ref: (.)', head, re.M)
File "C:\Python\Python38\lib\re.py", line 241, in findall
return _compile(pattern, flags).findall(string) TypeError: cannot use a string pattern on a bytes-like object
解决方法:
import chardet # modified
line 167: def git_head(self):
head = self.download_file('HEAD')
encode_type = chardet.detect(head) # modified
head = head.decode(encode_type['encoding']) # modified
issue1:
[09:54:07] [] Analyze .git/HEAD
None
Traceback (most recent call last):
File "git_extract.py", line 300, in
Git.git_init()
File "git_extract.py", line 289, in git_init
self.git_head()
File "git_extract.py", line 167, in git_head
refs = re.findall(r'ref: (.)', head, re.M)
File "C:\Python\Python38\lib\re.py", line 241, in findall
return _compile(pattern, flags).findall(string)
TypeError: cannot use a string pattern on a bytes-like object
解决方法:
import chardet # modified
line 167: def git_head(self):
head = self.download_file('HEAD')
encode_type = chardet.detect(head) # modified
head = head.decode(encode_type['encoding']) # modified
貌似是python2 到python3的问题
issue2
python3 下urllib2被urllib.request 取代了
utils.py 中没改,python38下运行会有问题,替换完就好了
The text was updated successfully, but these errors were encountered: