![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
叫我林接接就好了
这个作者很懒,什么都没留下…
展开
-
python 报错:invalid syntax (<string>, line 3)
python 报错:invalid syntax (<string>, line 3)原创 2022-06-22 18:10:47 · 970 阅读 · 0 评论 -
git新建分支并提交代码
1、创建仓库,新建分支并提交代码到远程仓库1.在本地新建文件夹,右键点击Git Base Here,打开git命令行设置用户信息 git config --global user.name "guohuitian" //设置用户名 git config --global user.email "xxx@foxmail.com" //设置邮箱初始化代码仓库,并文件提交至缓存区 git init //初始化仓库 git add . //添加所有文件至缓存区 git comm原创 2022-03-19 19:18:37 · 4615 阅读 · 0 评论 -
使用git提交代码到仓库报错总结
1、warning: LF will be replaced by CRLF in.idea/inspectionProfiles/profiles_settings.xml使用git add . 提示错误信息(warning),报错: warning: LF will be replaced by CRLF in.idea/inspectionProfiles/profiles_settings.xml. The file will have its original line endings i原创 2022-03-19 18:48:29 · 1932 阅读 · 0 评论 -
python3 requests设置headers = {‘Content-Type‘: ‘application/json‘ }未生效,解决方案
requests通过post请求,设置headers = {‘Content-Type’: ‘application/json’ }未生效问题1、requests中,设置headers参数{‘Content-Type’: ‘application/json’ },是将请求数据以json的格式发送,而headers中默认请求方式是表单提交:{‘Content-Type’: ‘application/x-www-form-urlencoded’ };问题:设置了headers = {‘Content-Ty原创 2022-03-06 13:52:56 · 13545 阅读 · 0 评论 -
python使用%s占位,只传一个参数,报错:TypeError: not all arguments converted during string formatting
python调用psycopg2库,查询语句时只传一个参数时报错,源代码如下:cur.execute('select username from users where username=%s;',(username))报错信息:原因: execute传参时,对于位置变量绑定,第二个参数必须始终是一个序列,如果是单个变量,Python需要使用逗号来创建单个元素元组:解决方法: 在参数后加上逗号cur.execute('select username from users where use原创 2022-01-15 21:24:09 · 1126 阅读 · 0 评论