Closed
Description
Describe the bug
I have a script that functions and I would like to run profiling on that script.
When running the profiler (via cProfile) I get a bug, and it is the same when I try to debug the same script with the Python debugger.
To Reproduce
Run the script:
python -m cProfile -o output_dump_file.cprof manage.py script-that-works
Results in the following error:
File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/opt/project/api/management/commands/qscore.py", line 7, in <module>
from api.calcul_qscore import preaudit
File "/opt/project/api/calcul_qscore.py", line 10, in <module>
from pvlib.location import Location
File "/usr/local/lib/python3.7/site-packages/pvlib/__init__.py", line 12, in <module>
from pvlib import spa
File "/usr/local/lib/python3.7/site-packages/pvlib/spa.py", line 259, in <module>
TABLE_1_DICT['L1'].resize((64, 3))
ValueError: cannot resize an array that references or is referenced
by another array in this way. Use the resize function
Expected behavior
Should be able to debug and profile the script without errors, as is the case when the script is run normally (without profiling or debugging)
Versions:
pvlib.0.6
:pandas.0.24
:- python: 3.7
Metadata
Metadata
Assignees
Labels
No labels