编程调试
voyagerlll
...
展开
-
C:\Program Files (x86)\Microsoft Visual Studio\2019\...\x64\cl.exe
CompileError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2原创 2023-01-04 16:49:35 · 484 阅读 · 0 评论 -
TypeError: can‘t pickle _thread.lock objects
参考链接:https://blog.csdn.net/weixin_41935140/article/details/81153611在实现多进程时遇到这个问题:class Scheduler(object): def __init__(self): self.redis = RedisClient() def schedule_get(...原创 2019-03-10 11:17:29 · 2851 阅读 · 0 评论 -
superset根据用户筛选数据源(row level security)
参考链接:https://github.com/apache/incubator-superset/pull/8699centos系统下 0.36,0.37版本测试过,可以实现步骤:1、更新superset目录下 config.py 文件中 ENABLE_ROW_LEVEL_SECURITY=True2、重新执行 superset init...原创 2020-09-03 18:27:24 · 1547 阅读 · 0 评论 -
windows下superset数据库查询出错及乱码
查了很多资料,并且在不断调试。所以无法一一列出出处,如有侵权,麻烦评论区留言会及时加上# supsert 查询出错更改虚拟环境中 site-packages\superset\utils\core.py 文件。将红框中的 代码注释调, 加上pass# 使用sqllab 查询出现乱码错误格式: 使用 mysql://用户名:密码@端口号 的格式中文可能...原创 2020-04-24 16:39:57 · 1322 阅读 · 0 评论 -
selenium.common.exceptions.WebDriverException: Message: unknown error: Runtime.executionContextCreat
参考链接:https://stackoverflow.com/questions/41832859/selenium-runtime-executioncontextcreated-has-invalid-context具体错误提示如下:selenium.common.exceptions.WebDriverException: Message: unknown error: Runtim...原创 2019-09-27 10:19:34 · 2053 阅读 · 0 评论 -
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd6 in position 0: invalid continuation byte
参考链接:https://stackoverflow.com/questions/19699367/unicodedecodeerror-utf-8-codec-cant-decode-byte?rq=1文件编码格式错误,按照图片中 encoding='utf-8' 替换为 encoding='ISO-8859-1'。用 pandas 读取文件出出现上述错误,也是在后面加正确的编码格...原创 2019-08-31 21:53:54 · 3995 阅读 · 0 评论 -
ValueError: could not convert string to float: 'Q'
可能是特征中有字符串类型,需要将特征转换成int 或float 就好了原创 2019-06-21 23:15:58 · 5566 阅读 · 0 评论 -
command 'x86_64-linux-gnu-gcc' failed with exit status 1(ubuntu安装scrapy)
参考链接:https://blog.csdn.net/keith_bb/article/details/65435337 https://github.com/scrapy/scrapy/issues/2115ubuntu1.安装scrapy 依赖(python3):sudo apt-get install python3 python-dev ...原创 2018-12-04 17:53:23 · 1051 阅读 · 0 评论 -
Unable to locate package python3-pip(阿里云服务器,ubuntu)
参考链接:https://community.c9.io/t/how-to-install-pip-for-python3/3196ubuntu系统默认没有pip3在安装pip3之前需要先更新下: sudo apt-get update然后在执行安装命令 sudo apt-get install python3-pip 安装完成之后可能还会遇到:Import...原创 2018-12-04 15:55:28 · 3309 阅读 · 0 评论 -
python 将csv文件转为json格式的文件
参考链接:https://stackoverflow.com/questions/19697846/how-to-convert-csv-file-to-multiline-json 如果想从本地文件将数据存入 MongoDB, 数据的格式必须是 csv 或者 json格式 在将 csv 格式的文件存入mongodb时,列元素之间的顺序错开了 所以想将 csv 格式的文件转为 ...原创 2018-09-13 21:08:33 · 18757 阅读 · 4 评论 -
python如何连接公司或者非本地mongoDB数据库,并存入数据
磨刀不误砍柴工,花点时间看mongodb的教程还是必要的,菜鸟教程里有:http://www.runoob.com/mongodb/mongodb-tutorial.html client = pymongo.MongoClient('mongodb://用户名:密码@host:27017')需要填写的三个参数: 用户名, 密码, hostimport pymongo# mo...原创 2018-09-12 17:39:44 · 1500 阅读 · 0 评论 -
(Scrapy)AttributeError: 'str' object has no attribute 'iter'
参考链接:https://stackoverflow.com/questions/29081330/scrapy-str-object-has-no-attribute-iter 在StackOverflow上找到的 restrict_xpaths应该指向元素 - 要么直接是链接要么包含链接而不是属性...翻译 2018-08-28 09:04:01 · 3121 阅读 · 0 评论 -
TypeError: can only concatenate list (not "str") to list
类型错误: 只能将list类型和list类型联系起来,而不是str类型 出现上述类型错误: 判断一下需要连接的两个变量的类型。 如果是将str类型加入list用append添加,如果是移除用pop或remove ...原创 2018-08-03 17:11:08 · 33276 阅读 · 0 评论 -
UnboundLocalError: local variable 'img' referenced before assignment
出现上述问题多半是 变量img为能获取相应数据, 但是在下方程序中使用 避免出现类似的问题,使用try,except, else还是必要的try: ...except xxx: ...else: ... 或者用在变量赋值前用 if 判断变量是否为空...原创 2018-07-25 20:42:22 · 10321 阅读 · 0 评论