Tag Archives: python

odoo Error: KeyError:‘ir.http‘ [How to Solve]

#####1 an error occurred while loading odoo


######2 first check the configuration file, especially the path

######3, and then enter – I base – D new database name in run/debug configurations

#####4 restart the server to see if it is OK. If not, reinstall the database and change the version of the database. If not, reload the source code. The source code may have been accidentally changed

After reading, remember to like it, refill

[Solved] python tqdm raise RuntimeError(“cannot join current thread“) RuntimeError: cannot join current thr

The following error occurred when using tqdm today:

Exception ignored in: <function tqdm.__del__ at 0x7f78f8445320>
Traceback (most recent call last):
  File "/root/anaconda3/lib/python3.7/site-packages/tqdm/_tqdm.py", line 931, in __del__
    self.close()
  File "/root/anaconda3/lib/python3.7/site-packages/tqdm/_tqdm.py", line 1133, in close
    self._decr_instances(self)
  File "/root/anaconda3/lib/python3.7/site-packages/tqdm/_tqdm.py", line 496, in _decr_instances
    cls.monitor.exit()
  File "/root/anaconda3/lib/python3.7/site-packages/tqdm/_monitor.py", line 52, in exit
    self.join()
  File "/root/anaconda3/lib/python3.7/threading.py", line 1041, in join
    raise RuntimeError("cannot join current thread")
RuntimeError: cannot join current thread

I didn’t expect tqdm to have a bug

Solution:

pip install tqdm --upgrade

Python Use PIP to install pyinstaller Error [Solved]

1. Error reporting using pip

D:\date\IDEA\Game\PyInstaller-3.4>pip install pyinstaller
'pip' is not an internal or external command, nor is it a runnable program
or batch file.

Solution: add environment variables

Add new system variables.
Variable name: PYTHON_HOME
Variable value: D:\software\anaconda3\Scripts
Modify the path variable.
	Add:%PYTHON_HOME%

2. Error when installing pyinstaller with PIP

D:\date\IDEA\Game\PyInstaller-3.4>pip install pyinstaller
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyinstaller/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyinstaller/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyinstaller/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyinstaller/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyinstaller/
Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/pyinstaller/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /simple/pyinstaller/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement pyinstaller (from versions: none)
ERROR: No matching distribution found for pyinstaller
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

Solution: add trust source

D:\date\IDEA\Game\PyInstaller-3.4>pip install  pyinstaller  --index-url http://pypi.douban.com/simple/    --trusted-host pypi.douban.com
Looking in indexes: http://pypi.douban.com/simple/
Collecting pyinstaller
  Downloading http://pypi.doubanio.com/packages/da/98/ba0071620a2bd672cd98b398653517a296f988a8271d9d2f365a7922a51b/pyinstaller-4.7-py3-none-win_amd64.whl (2.0 MB)
     |████████████████████████████████| 2.0 MB 2.2 MB/s
Requirement already satisfied: pywin32-ctypes>=0.2.0 in d:\software\anaconda3\lib\site-packages (from pyinstaller) (0.2.0)
Collecting pyinstaller-hooks-contrib>=2020.6
  Downloading http://pypi.doubanio.com/packages/80/74/4c885df43604c4ae570610e187052f29d806d582e398c2e48b83dad74610/pyinstaller_hooks_contrib-2021.4-py2.py3-none-any.whl (215 kB)
     |████████████████████████████████| 215 kB ...
Collecting pefile>=2017.8.1
  Downloading http://pypi.doubanio.com/packages/ee/e1/a7bd302cf5f74547431b4e9b206dbef782d112df6b531f193bb4a29fb1b9/pefile-2021.9.3.tar.gz (72 kB)
     |████████████████████████████████| 72 kB ...
Collecting altgraph
  Downloading http://pypi.doubanio.com/packages/84/3f/1a5c9bef54cac9bf41edd6f4aaf61cd52ed578e10ccc607e0278012cb4a5/altgraph-0.17.2-py2.py3-none-any.whl (21 kB)
Requirement already satisfied: setuptools in d:\software\anaconda3\lib\site-packages (from pyinstaller) (58.0.4)
Requirement already satisfied: future in d:\software\anaconda3\lib\site-packages (from pefile>=2017.8.1->pyinstaller) (0.18.2)
Building wheels for collected packages: pefile
  Building wheel for pefile (setup.py) ... done
  Created wheel for pefile: filename=pefile-2021.9.3-py3-none-any.whl size=68844 sha256=139bf21106643db9019b3f0c33e2da41e2bda609170130bb24491cf1a5eeba0a
  Stored in directory: c:\users\edz\appdata\local\pip\cache\wheels\7b\f8\a2\c28c8f2797bf32ae30e18da14e5a5ab9cfbfb72da03593426d
Successfully built pefile
Installing collected packages: pyinstaller-hooks-contrib, pefile, altgraph, pyinstaller
Successfully installed altgraph-0.17.2 pefile-2021.9.3 pyinstaller-4.7 pyinstaller-hooks-contrib-2021.4

[Solved] OpenCV VideoWriter Error: FFMPEG: tag ‘MP4V‘ is not supported with codec id 12 and format mp4

1. Problem code

A few months ago, a piece of code could be executed normally. Some of the codes are as follows:

def buildVideoByCV():
    videoMake = cv2.VideoWriter()
    fourcc = cv2.VideoWriter_fourcc(*'MP4V') #https://blog.csdn.net/whudee/article/details/108689420
    fps = 12
    videoMake.open(r"g:\video\lightShowCV.MP4", fourcc, fps, (800,600))

    for t in range(65*fps):
        img = makeframe(t*1.0/fps)
        videoMake.write(img)
        if t%20==0:print(f'\r视频制作进度:{(t*100.0)/(66*fps):4.2f}%',end='')
    videoMake.release()

2. Error message

Error in execution today:

Video production progress: 95.96%OpenCV: FFMPEG: tag 0x5634504d/'MP4V' is not supported with codec id 12 and format 'mp4/MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v'

3. Solution

Set FourCC = cv2.videowriter_FourCC (*'mp4v') is changed to: FourCC = CV2.Videowriter_FourCC (*'mp4v') , just change the encoded uppercase mp4v to lowercase.

4. Summary

This paper introduces the solution to the error reported by opencv videowriter: ffmpeg: tag ‘mp4v’ is not supported. You only need to replace the code ‘mp4v’ with ‘mp4v’.

bandersnatch Error: No module Named [How to Solve]

ERROR: Unable to load entry point swift_plugin = bandersnatch_storage_plugins.swift:SwiftStorage: No module named ‘keystoneauth1’
This solution is missing at the time of installation due to python version, solution:
pip3 install keystoneauth1
Collecting keystoneauth1
Downloading https://files.pythonhosted.org/packages/7c/2e/dcfd2412941244e8a00a568654ce1687a1cab7be05d634ada0b5a078d0a3/keystoneauth1-4.4.0-py3-none-any.whl (314kB)
100% |████████████████████████████████| 317kB 240kB/s
Collecting pbr!=2.1.0,>=2.0.0 (from keystoneauth1)
Downloading https://files.pythonhosted.org/packages/73/c3/d45171501210b0305f4c93fafe50950f0c2228e87034ceb51744bd03ff08/pbr-5.8.0-py2.py3-none-any.whl (112kB)
100% |████████████████████████████████| 122kB 184kB/s
Requirement already satisfied: requests>=2.14.2 in /usr/lib/python3/dist-packages (from keystoneauth1)
Collecting stevedore>=1.20.0 (from keystoneauth1)
Downloading https://files.pythonhosted.org/packages/7a/bc/fcce9e50da73ea23af6d236e05e15db8a02da1099a5e0a479451bcea3833/stevedore-3.5.0-py3-none-any.whl (49kB)
100% |████████████████████████████████| 51kB 166kB/s
Requirement already satisfied: six>=1.10.0 in /usr/lib/python3/dist-packages (from keystoneauth1)
Collecting iso8601>=0.1.11 (from keystoneauth1)
Downloading https://files.pythonhosted.org/packages/df/e5/589bc81d410139ec4e4f37d9af5a50987566abf6d087b3c4fbed708109a9/iso8601-1.0.2-py3-none-any.whl
Collecting os-service-types>=1.2.0 (from keystoneauth1)
Downloading https://files.pythonhosted.org/packages/10/2d/318b2b631f68e0fc221ba8f45d163bf810cdb795cf242fe85ad3e5d45639/os_service_types-1.7.0-py2.py3-none-any.whl
Collecting importlib-metadata>=1.7.0; python_version < “3.8” (from stevedore>=1.20.0->keystoneauth1)
Downloading https://files.pythonhosted.org/packages/c4/1f/e2238896149df09953efcc53bdcc7d23597d6c53e428c30e572eda5ec6eb/importlib_metadata-4.8.2-py3-none-any.whl
Collecting zipp>=0.5 (from importlib-metadata>=1.7.0; python_version < “3.8”->stevedore>=1.20.0->keystoneauth1)
Using cached https://files.pythonhosted.org/packages/bd/df/d4a4974a3e3957fd1c1fa3082366d7fff6e428ddb55f074bf64876f8e8ad/zipp-3.6.0-py3-none-any.whl
Requirement already satisfied: typing-extensions>=3.6.4; python_version < “3.8” in /usr/local/lib/python3.7/dist-packages (from importlib-metadata>=1.7.0; python_version < “3.8”->stevedore>=1.20.0->keystoneauth1)
Installing collected packages: pbr, zipp, importlib-metadata, stevedore, iso8601, os-service-types, keystoneauth1
Successfully installed importlib-metadata-4.8.2 iso8601-1.0.2 keystoneauth1-4.4.0 os-service-types-1.7.0 pbr-5.8.0 stevedore-3.5.0 zipp-3.6.0


ERROR: Unable to load entry point swift_plugin = bandersnatch_storage_plugins.swift:SwiftStorage: No module named ‘swiftclient’
This one was installed with python-swiftclient missing.
Solution:
pip3 install python-swiftclient
Collecting python-swiftclient
Downloading https://files.pythonhosted.org/packages/f6/5f/6784a830e618a89272f8efee784930e614be285a6d3e82986916076fe69e/python_swiftclient-3.13.0-py2.py3-none-any.whl (86kB)
100% |████████████████████████████████| 92kB 281kB/s
Requirement already satisfied: six>=1.9.0 in /usr/lib/python3/dist-packages (from python-swiftclient)
Requirement already satisfied: requests>=1.1.0 in /usr/lib/python3/dist-packages (from python-swiftclient)
Installing collected packages: python-swiftclient
Successfully installed python-swiftclient-3.13.0

[Solved] Pytorch c++ Error: Error checking compiler version for cl: [WinError 2] System cannot find the specified file.

1. Error information

(python37) H:\emd>python setup.py install
running install
running bdist_egg
running egg_info
creating emd.egg-info
writing emd.egg-info\PKG-INFO
writing dependency_links to emd.egg-info\dependency_links.txt
writing top-level names to emd.egg-info\top_level.txt
writing manifest file 'emd.egg-info\SOURCES.txt'
 D:\Anaconda_app\envs\python37\lib\site-packages\torch\utils\cpp_extension.py:370: UserWarning: Attempted to use ninja as the BuildExtension backend but we
could not find ninja.. Falling back to using the slow distutils backend. 
  warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'emd.egg-info\SOURCES.txt'
writing manifest file 'emd.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_ext
D:\Anaconda_app\envs\python37\lib\site-packages\torch\utils\cpp_extension.py:305: UserWarning: Error checking compiler version for cl: [WinError 2] The system finds The specified file was not found.
  warnings.warn(f'Error checking compiler version for {compiler}: {error}')
building 'emd' extension
creating build
creating build\temp.win-amd64-3.7
……
D:\Anaconda_app\envs\python37\lib\site-packages\torch\include\c10/util/Optional.h(427): note: See the instantiation of "OptionalBase<at::Tensor>" to the class template being compiled.
References
D:\Anaconda_app\envs\python37\lib\site-packages\torch\include\ATen/core/TensorBody.h(734): note: See the class template instantiating "c10:: optional<at::Tensor>
" reference
D:\Anaconda_app\envs\python37\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: "c10::trivially_ copyable_optimization_optional_base
<T>": the destructor has been implicitly defined as "deleted"
        with
        [
            T=at::Tensor
        ]
D:\Anaconda_app\envs\python37\lib\site-packages\torch\include\c10/util/Optional.h(476): warning C4814: “c10::optional<at::Tensor>::contained_val”: In C++
14, "constexpr" will not mean "constant"; please consider specifying "constant" explicitly
D:\Anaconda_app\envs\python37\lib\site-packages\torch\include\c10/util/Optional.h(477): error C2556: “at::Tensor &c10::optional<at::Tensor>::contained_val
(void) const &”: Overloaded functions with “const at::Tensor &c10::optional<at::Tensor>::contained_val(void) const &”It just differs in the return type
D:\Anaconda_app\envs\python37\lib\site-packages\torch\include\c10/util/Optional.h(471): note: See the declaration of "c10::optional<at::Tensor>::contained_val"
D:\Anaconda_app\envs\python37\lib\site-packages\torch\include\c10/util/Optional.h(477): error C2373: “c10::optional<at::Tensor>::contained_val”: Redefinition.
Different type modifiers
D:\Anaconda_app\envs\python37\lib\site-packages\torch\include\c10/util/Optional.h(471): note: see "c10::optional<at:: Tensor>::contained_val" declaration
D:\Anaconda_app\envs\python37\lib\site-packages\torch\include\c10/util/Optional.h(476): warning C4814: "c10::optional< int64_t>::contained_val": in C++14
In C++14, "constexpr" will not mean "constant"; please consider specifying "constant" explicitly
D:\Anaconda_app\envs\python37\lib\site-packages\torch\include\ATen/core/TensorBody.h(774): note: see instantiating "c10:: optional<int64_t>" for the
References
D:\Anaconda_app\envs\python37\lib\site-packages\torch\include\c10/util/Optional.h(477): error C2556: "int64_t &c10:: optional<int64_t>::contained_val(void)
 const &": overloaded function is the same as "const int64_t &c10::optional<int64_t>::contained_val(void) const & " only differs in the return type
D:\Anaconda_app\envs\python37\lib\site-packages\torch\include\c10/util/Optional.h(471): note: see "c10::optional<int64_t t>::contained_val" declaration
D:\Anaconda_app\envs\python37\lib\site-packages\torch\include\c10/util/Optional.h(477): error C2373: "c10::optional< int64_t>::contained_val": redefinition; different
Same type modifier
D:\Anaconda_app\envs\python37\lib\site-packages\torch\include\c10/util/Optional.h(471): note: see "c10::optional< int64_t t>::contained_val" declaration
D:\Anaconda_app\envs\python37\lib\site-packages\torch\include\c10/util/Optional.h(477): fatal error C1003: error count exceeds 100; compilation is being stopped
error: command 'D:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2


2. Error analysis
Analysis: From the above error message, we get the information
D:\Anaconda_app\envs\python37\lib\site-packages\torch\utils\cpp_extension.py:370: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja… Falling back to using the slow distutils backend.
D:\Anaconda_app\envs\python37\lib\site-packages\torch\utils\cpp_extension.py:305: UserWarning: Error checking compiler version for cl: [WinError 2] The system could not find the
warnings.warn(f’Error checking compiler version for {compiler}: {error}’)
1) I need to use the ninja package to compile, but I don’t have ninja installed, so I need to install ninja first (pip install ninja)
2) Can’t find the cl.exe that meets the required version, according to the given D:\Anaconda_app\envs\python37\lib\site-packages\torch\utils\cpp_extension.py:305:
Jump to source code

    try:
        if sys.platform.startswith('linux'):
            minimum_required_version = MINIMUM_GCC_VERSION
            versionstr = subprocess.check_output([compiler, '-dumpfullversion', '-dumpversion'])
            version = versionstr.decode().strip().split('.')
        else:
            minimum_required_version = MINIMUM_MSVC_VERSION
            compiler_info = subprocess.check_output(compiler, stderr=subprocess.STDOUT)
            match = re.search(r'(\d+)\.(\d+)\.(\d+)', compiler_info.decode().strip())
            version = (0, 0, 0) if match is None else match.groups()
    except Exception:
        _, error, _ = sys.exc_info()
        warnings.warn(f'Error checking compiler version for {compiler}: {error}')
        return False

I am not on the Linux platform, but on the win platform, so I found the version requirements of cl.exe:

MINIMUM_MSVC_VERSION = (19, 0, 24215)

MSVC is a compiler called “cl.exe”. It is a compiler specially developed by Microsoft for vs.

The above statement states that the minimum version of MSVC requires MSVC 19.0.24215

3. Knowledge to be understood

_MSC_Ver is the built-in macro of MSVC compiler, which defines the version of the compiler
MS is short for Microsoft
C MSc is Microsoft’s C compiler
short for ver version.

So _MSC_Ver means: the version of Microsoft’s C compiler.

MSC    1.0   _MSC_VER == 100
MSC    2.0   _MSC_VER == 200
MSC    3.0   _MSC_VER == 300
MSC    4.0   _MSC_VER == 400
MSC    5.0   _MSC_VER == 500
MSC    6.0   _MSC_VER == 600
MSC    7.0   _MSC_VER == 700
MSVC++ 1.0   _MSC_VER == 800
MSVC++ 2.0   _MSC_VER == 900
MSVC++ 4.0   _MSC_VER == 1000 (Developer Studio 4.0)
MSVC++ 4.2   _MSC_VER == 1020 (Developer Studio 4.2)
MSVC++ 5.0   _MSC_VER == 1100 (Visual Studio 97 version 5.0)
MSVC++ 6.0   _MSC_VER == 1200 (Visual Studio 6.0 version 6.0)
MSVC++ 7.0   _MSC_VER == 1300 (Visual Studio .NET 2002 version 7.0)
MSVC++ 7.1   _MSC_VER == 1310 (Visual Studio .NET 2003 version 7.1)
MSVC++ 8.0   _MSC_VER == 1400 (Visual Studio 2005 version 8.0)
MSVC++ 9.0   _MSC_VER == 1500 (Visual Studio 2008 version 9.0)
MSVC++ 10.0  _MSC_VER == 1600 (Visual Studio 2010 version 10.0)
MSVC++ 11.0  _MSC_VER == 1700 (Visual Studio 2012 version 11.0)
MSVC++ 12.0  _MSC_VER == 1800 (Visual Studio 2013 version 12.0)
MSVC++ 14.0  _MSC_VER == 1900 (Visual Studio 2015 version 14.0)
MSVC++ 14.1  _MSC_VER == 1910 (Visual Studio 2017 version 15.0)
MSVC++ 14.11 _MSC_VER == 1911 (Visual Studio 2017 version 15.3)
MSVC++ 14.12 _MSC_VER == 1912 (Visual Studio 2017 version 15.5)
MSVC++ 14.13 _MSC_VER == 1913 (Visual Studio 2017 version 15.6)
MSVC++ 14.14 _MSC_VER == 1914 (Visual Studio 2017 version 15.7)
MSVC++ 14.15 _MSC_VER == 1915 (Visual Studio 2017 version 15.8)
MSVC++ 14.16 _MSC_VER == 1916 (Visual Studio 2017 version 15.9)
MSVC++ 14.2  _MSC_VER == 1920 (Visual Studio 2019 Version 16.0)
MSVC++ 14.21 _MSC_VER == 1921 (Visual Studio 2019 Version 16.1)
MSVC++ 14.22 _MSC_VER == 1922 (Visual Studio 2019 Version 16.2)

For example, MSVC + + 14.0 indicates that the version of Visual C + + is 14.0, and visual studio 2015 in parentheses indicates that the VC + + is included in Microsoft development tool visual studio 2015.

4. Review problems and Solutions

1) Ninja has been installed
2) compared with the table in the third part, I need to install vs2017 at least, but the vs version in the computer is 2015. Uninstall and reinstall. (some small partners can reinstall directly without uninstallation. They are used to uninstalling and reinstalling)
vs2015 complete uninstallation: use totaluninstaller to completely uninstall visual studio 2013 and 2015
vs2017 installation: vs2017 download address and installation tutorial (illustration)

The vs2017 download method in the above link is highly recommended. There is a simplified Chinese version of the installation boot program, which is very convenient~

How to Solve paddleOCR recognition of curved text Error

Lower the version of paddlepaddle from 2.2.0 to 2.1.3 and you’re done. Note that there are two commands to run:

python  tools/export_model.py -c configs/det/det_r50_vd_sast_totaltext.yml -o Global.checkpoints="./models/sast_r50_vd_total_text/best_accuracy" Global.save_inference_dir="./inference/det_sast_tt"

python3 tools/infer/predict_det.py --det_algorithm="SAST" --image_dir="./doc/imgs_en/img_10.jpg" --det_model_dir="./inference/det_sast_tt/" --det_sast_polygon=True --use_gpu=False

 

/home/PaddleOCR {release/2.3} python3 tools/infer/predict_det.py --det_algorithm="SAST" --image_dir="./doc/imgs_en/img623.jpg" --det_model_dir="./inference/det_sast_tt/" --det_sast_polygon=True --use_gpu=False
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
/usr/local/lib/python3.8/site-packages/setuptools/depends.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
---    Fused 0 subgraphs into layer_norm op.
---    fused 0 pairs of fc gru patterns
Traceback (most recent call last):
  File "tools/infer/predict_det.py", line 242, in <module>
    res = text_detector(img)
  File "tools/infer/predict_det.py", line 218, in __call__
    post_result = self.postprocess_op(preds, shape_list)
  File "/home/PaddleOCR/ppocr/postprocess/sast_postprocess.py", line 341, in __call__
    poly_list = self.detect_sast(
  File "/home/PaddleOCR/ppocr/postprocess/sast_postprocess.py", line 237, in detect_sast
    instance_count, instance_label_map = self.cluster_by_quads_tco(
  File "/home/PaddleOCR/ppocr/postprocess/sast_postprocess.py", line 164, in cluster_by_quads_tco
    pred_tc = xy_text - tco
ValueError: operands could not be broadcast together with shapes (43093,2) (43093,8)

 

 

[Solved] python Error: GuessedAtParserWarning: No parser was explicitly specified

f:\py\verification.py:148: GuessedAtParserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

The code that caused this warning is on line 148 of the file f:\py\verification.py. To get rid of this
warning, pass the additional argument 'features="lxml"' to the BeautifulSoup constructor.

It can operate normally, but an error message is prompted on the output console

soup = BeautifulSoup(response, ‘html’)

add: Features = "lxml" is fine

soup = BeautifulSoup(response, features="lxml")

[Solved] RecursionError: maximum recursion depth exceeded in comparison

It is found that the default recursion depth of Python is very limited (the default is 1000), so when the recursion depth exceeds 999, such an exception will be thrown.

Solution:

You can modify the value of recursion depth to make it larger

import sys

Sys.setrecursionlimit (100000) # for example, it is set to 100000 here

be careful:

This solution is not the root cause, but also needs to be optimized in the code.