tags: python_bug record pycharm python ide
Solution, I will not copy it anymore
refer toPycharm, use Python Cyperror: An Integer Is Required (GOT TYPE BYTES) solution (python3.8) _WWWWHY_ Blog-CSDN blog
Before
Traceback (most recent call last):
File "C:\Users\komorip\Desktop\daliy\python\PyCharm 2019.1.1\helpers\pydev\pydevconsole.py", line 33, in <module>
from _pydev_bundle.pydev_console_utils import BaseInterpreterInterface
File "C:\Users\komorip\Desktop\daliy\python\PyCharm 2019.1.1\helpers\pydev\_pydev_bundle\pydev_console_utils.py", line 11, in <module>
from _pydevd_bundle import pydevd_thrift
File "C:\Users\komorip\Desktop\daliy\python\PyCharm 2019.1.1\helpers\pydev\_pydevd_bundle\pydevd_thrift.py", line 17, in <module>
from pydev_console.protocol import DebugValue, GetArrayResponse, ArrayData, ArrayHeaders, ColHeader, RowHeader, \
File "C:\Users\komorip\Desktop\daliy\python\PyCharm 2019.1.1\helpers\pydev\pydev_console\protocol.py", line 6, in <module>
_console_thrift = _shaded_thriftpy.load(os.path.join(os.path.dirname(os.path.realpath(__file__)), "console.thrift"),
File "C:\Users\komorip\Desktop\daliy\python\PyCharm 2019.1.1\helpers\third_party\thriftpy\_shaded_thriftpy\parser\__init__.py", line 29, in load
thrift = parse(path, module_name, include_dirs=include_dirs,
File "C:\Users\komorip\Desktop\daliy\python\PyCharm 2019.1.1\helpers\third_party\thriftpy\_shaded_thriftpy\parser\parser.py", line 502, in parse
parser.parse(data)
File "C:\Users\komorip\Desktop\daliy\python\PyCharm 2019.1.1\helpers\third_party\thriftpy\_shaded_ply\yacc.py", line 331, in parse
return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
File "C:\Users\komorip\Desktop\daliy\python\PyCharm 2019.1.1\helpers\third_party\thriftpy\_shaded_ply\yacc.py", line 1106, in parseopt_notrack
p.callable(pslice)
File "C:\Users\komorip\Desktop\daliy\python\PyCharm 2019.1.1\helpers\third_party\thriftpy\_shaded_thriftpy\parser\parser.py", line 212, in p_struct
val = _fill_in_struct(p[1], p[3])
File "C:\Users\komorip\Desktop\daliy\python\PyCharm 2019.1.1\helpers\third_party\thriftpy\_shaded_thriftpy\parser\parser.py", line 765, in _fill_in_struct
gen_init(cls, thrift_spec, default_spec)
File "C:\Users\komorip\Desktop\daliy\python\PyCharm 2019.1.1\helpers\third_party\thriftpy\_shaded_thriftpy\thrift.py", line 103, in gen_init
cls.__init__ = init_func_generator(default_spec)
File "C:\Users\komorip\Desktop\daliy\python\PyCharm 2019.1.1\helpers\third_party\thriftpy\_shaded_thriftpy\_compat.py", line 102, in init_func_generator
new_code = types.CodeType(len(varnames),
TypeError: an integer is required (got type bytes)
Process finished with exit code 1
after
Can use console normally
Python packs into an EXE file First, you need to install the Pyinstaller library, then enter the target file directory, enter the command line package PY file, but an error occurred:TypeError: an inte...
Code: An error was encountered when opening files The following code changes to solve the problem The specific reasons unknown, seeking answers to big brother...
Linux [Ubuntu, other versions are for reference only] Run the Pyspark program in Jupyter Notebook error, query information discovery, current2020.11.18Pyspark still does not support higher version of ...
Problems encountered in debugging code today TypeError: an integer is required (got type str) problem causes In the open function of the open file object in python3, the following is the wrong way of ...
TypeError: an integer is required (got type bytes) error correction method of seeking correction Traceback (most recent call last): File “F:/python/automatic/tsTserv.py”, line 18, in tcpCl...
The environment is Ubuntu, jdk8, spark-2.4.5-bin-hadoop2.7, python3.8.2 1. Reason Since spark does not yet support python3.8 2. Solution So just downgrade python, I downgrade to python3.6.9 successful...
When importing the Sklearn library, encounter TypeError: an integer is required (got type bytes) First check your Sklearn version, when you install Sklearn, if you use the following PIP command, you m...
Python Socket TypeError: an integer is required (got type str) You can see that the Python prompts to connect, and the error isan integer is required (got type str) Then I saw my code. It is only nece...
TypeError: an integer is required (got type tuple) RandomResizedCrop Labels (space separated):pytorch This error may be caused by the version, but I did not find a solution on the Internet, and I foun...