Python

※This article is based on Python 3.7.3

TypeError: 'str' object is not callable [edit]

str( )是python自带函数,是python保留的关键字,定义变量时应该避免使用str作为变量名

如果在使用str( )函数之前已经定义过str变量,则会出现TypeError: ‘str’ object is not callable这个报错

SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xd7 in position 0: invalid continuation byte [edit]

把文件的编码改为 UTF-8

SyntaxError: Non-UTF-8 code starting with '\xc9' in file ./test.py on line 5, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details [edit]

代码第一行加入:

# -*- coding: UTF-8 -*-

ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+ [edit]

下面两种错误

Terminal窗口执行

pip install urllib3==1.26.15

コメント:



(画像の文字列を入力して下さい)

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS