Debugging in Pycharm - Calling MySQL Stored Procedure in a loop hangs script

I have a Python Script which calls a MySQL Stored Procedure in a loop which repeats about 60 times ( 5 years and 12 months of Data). If I run the script normally there is no problem, but if I run it in 'Debug' it will hang when calling the Stored Procedure after about 20 iterations.

Any ideas why this should happen?

0
6 comments

Hi,
I couldn't find similar issues in our issue tracker so it may be related to another bug or it's a yet unknown one.

Is there any chance you could provide an example that reproduces the problem?

See if adding these environment variables to your run configuration (Run | Edit Configurations...) helps:

PYDEVD_USE_CYTHON=NO
PYDEVD_USE_FRAME_EVAL=NO

0

Sergey Karpov thanks for the quick response.

I have added the Environment Variables and ran it again in debug mode, but it failed at 2018-07 it is looping through the years then the months so starting at 2017-01 it has done 32 of the 60 before falling over. It definitely fails on the call to the Stored Procedure

Running in the IDE not in debug mode works fine.

0

Let's add one more env variable PYCHARM_DEBUG=True to see additional debug output.
Could you reproduce the issue and provide the whole console output?

0

OK, here is the output: It only managed 9 iterations this time.

/home/francis/bin/PythonEnvironments/Py_MetGraphing_Generic/bin/python3 /home/francis/.local/share/JetBrains/Toolbox/apps/PyCharm-P/ch-0/203.7148.72/plugins/python/helpers/pydev/pydevd.py --multiproc --qt-support=auto --client 127.0.0.1 --port 33951 --file /home/francis/FG-Docs/PycharmProjects/Py_ArchiveMetPV/py_archive_metpv.py
Executing PyCharm's `sitecustomize`
Custom matplotlib backend was set for SciView
warning: PYDEVD_USE_CYTHON environment variable is set to 'NO'. Frame evaluator will be also disabled because it requires Cython extensions to be enabled in order to operate correctly.
Connected to pydev debugger (build 203.7148.72)
=== Scientific View debug enabled ===
Program Starting
/home/francis/FG-Docs/PycharmProjects/Py_ArchiveMetPV/py_archive_metpv.conf
Creating 2017-01
Creating 2018-01
Creating 2019-01
Creating 2020-01
Creating 2021-01
Creating 2017-02
Creating 2018-02
Creating 2019-02
Creating 2020-02

 

0

Hmm, that's weird.

Could you upload your logs folder zipped from Help | Collect Logs and Diagnostic Data to our FTP server https://uploads.services.jetbrains.com/ and let me know the Upload ID?

0

OOps!,had to upload twice forgot to copy the ID first time. Second one is 2021_03_15_7NiMc9VRHE8MT5CC

I only left the data referring to the current program from the indexing-diagnostic folder

Cheers

0

Please sign in to leave a comment.