我尝试执行'pbapclient.py'文件。我从https://github.com/bmwcarit/pypbap下载了文件,但是控制台提示符显示了一些错误。我想从我的Android手机打印/保存我的所有联系人(我有一台m9的htc)。我运行antergos。我尝试了至少4个月...感谢您的帮助。这是提示
[mattia@LinuxMattia pypbap-master]$ python3 pbapclient.py
Traceback (most recent call last): File "pbapclient.py", line 22, in
<module> from PyOBEX import client File "/usr/lib/python3.7/site-
packages/PyOBEX/client.py", line 489, in <module>
class SyncClient(Client): File "/usr/lib/python3.7/site-
packages/PyOBEX/client.py", line 491, in SyncClient
def connect(self, header_list = (headers.Target("IRMC-SYNC"),)):
File "/usr/lib/python3.7/site-packages/PyOBEX/headers.py", line 33, in
__init__
self.data = self.encode(data)
File "/usr/lib/python3.7/site-packages/PyOBEX/headers.py", line 48, in
encode return struct.pack(">BH", self.code, len(data) + 3) + data
TypeError: can't concat str to bytes
谢谢您的帮助
安装指南(https://github.com/bmwcarit/pypbap#installation)告诉您程序需要使用python2运行,但是您使用的是python3。