python - LightRun Python 代理错误:TypeError:只能将 str(不是“NoneType”)连接到 str
问题描述
当我尝试运行Lightrun python 代理时,我收到此错误:
$ python3 main.py
Traceback (most recent call last):
File "main.py", line 4, in <module>
lightrun.enable(com_lightrun_server="https://app.lightrun.com/soumibardhan",
File "<frozen lightrun>", line 142, in enable
File "<frozen lightrun>", line 73, in _StartDebugger
File "<frozen lightrun.hub_client>", line 89, in __init__
TypeError: can only concatenate str (not "NoneType") to str
复制:
第二步我选择了pycharm和python。下一步,登录,工作。但是尝试运行代理会出现此错误。
这是我的 main.py :
if __name__ == '__main__':
try:
import lightrun
lightrun.enable(com_lightrun_server="https://app.lightrun.com/soumibardhan",
com_lightrun_secret="<your personal token>")
except ImportError as e:
print("Error importing Lightrun: ", e)
print('PyCharm')
只需在此处替换您的令牌或按照 lightrun 安装步骤操作即可。
我被困在这一步。请帮忙。
解决方案
请注意,您应该使用的 URL 是:
lightrun.enable(com_lightrun_server='https://app.lightrun.com/company/soumibardhan', com_lightrun_secret='XXXX')
(注意添加/company/
)。
推荐阅读
- ios - UITableview 在标题部分上方添加空间
- java - 从另一个位置运行 executeBatch()
- android - 使用 SQlite 数据填充实现进度条
- java - servlet 执行引发异常 - NoClassDefFound 错误
- reactjs - 在 react、sinon 或 jest 中测试计时器
- excel - 使用 Excel 公式替换部分字符串
- android - 关于谷歌最新架构指南的 MVVM 模式,如何将数据(通知)从存储库 calss 传递到 ModelView 类
- video - 视频压缩
- stylish - 如何在引导程序中滚动导航栏视图之前和之后创建时尚?
- java-io - 如何在java中使用用户名创建子文件夹