0

我正在编写应用程序,需要将文本文件从手机发送到我的 PC。使用 PyBluez、PyOBEX、Python 2.7.15 和 Windows10 64 位、LG K10LTE。试图从这篇文章运行代码: Convert and save string to binary file in Python 但出现错误:

 a, b = client.get("here.txt")
  File "C:\Python27\lib\site-packages\PyOBEX\client.py", line 312, in get
    for response in self._get(name, header_list):
  File "C:\Python27\lib\site-packages\PyOBEX\client.py", line 342, in _get
    max_length = self.remote_info.max_packet_length
AttributeError: BrowserClient instance has no attribute 'remote_info'

当我尝试这个小改变时:

from bluetooth import *
from PyOBEX.client import Client
client = Client(host, port)
client.connect()
b = client.get("here.txt")
print b

b 返回:

<PyOBEX.responses.UnknownResponse instance at 0x000000000351FE08>

有人可以帮我解释为什么这些代码不起作用以及如何解决它吗?或者告诉我如何通过蓝牙从手机接收文本文件?

4

0 回答 0