使用请求和线程库运行python程序时出错 [英] Error while running python program with requests and threading lib
问题描述
我是python的新手.由于出现错误,我在安装线程库时遇到了麻烦.我问并被告知该库已经存在,因此出现了此错误.现在,当我运行程序时,出现此错误.我不确定如何解决它或做什么.另一个问题是此问题使终端不响应(无法输入任何内容或退出).我应该提到,其他人正在运行相同的程序而没有问题(他们知道python).该代码适用于Sony QX100相机.
I am new to python. I was having trouble installing threading library because I had an error. I asked and was told that the library already existed and therefore I was getting this error. Now, when I run my program I get this error. I am not sure how to fix it or what to do. The other problem is that this problem makes the terminal not responsive (cannot enter anything or exit). I should mention that others are running the same program without problems (they know python). The code is for Sony QX100 camera.
Line 24: s = start_liveview()
Line 45: response = requests.post(cam_url, data=json.dumps(payload), headers=headers)
Line 109: response = sony_api_call("startLiveview", [])
注意:在行的末尾不使用分号(不确定是否相关). 当前的错误和问题 ... 安装线程错误 ...
Note: no semi colon are used at the end of the lines (not sure if that is relevant). current error and problem... error installing threading...
推荐答案
我解决了这个问题.代码没什么错.相机WiFi连接无法连接到PC.
I resolved the problem. It wasn't anything wrong with the code. The camera WiFi connection had problem connecting to the PC.
这篇关于使用请求和线程库运行python程序时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!