Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug mode dosn't function #18041

Closed
5 of 10 tasks
Ptiji opened this issue May 28, 2022 · 5 comments
Closed
5 of 10 tasks

Debug mode dosn't function #18041

Ptiji opened this issue May 28, 2022 · 5 comments

Comments

@Ptiji
Copy link

Ptiji commented May 28, 2022

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

When I try to solve my script (project with multiple function in many scripts.py) with breakpoints in main script, I have an error (below) (since 3.2.2 I think). When i use breakpoint in thermal_resistances.py and exec this script in debug mod, it's work...

I don't understand the error in this line import scipy.integrate as scint. I don't have error.

With a normal execution, the script run.

What steps reproduce the problem?

  1. Tick breakpoint in main script
  2. Execute debug mode

Paste Traceback/Error Below (if applicable)

File /usr/lib/python3.10/site-packages/numpy/core/getlimits.py:459 in __new__
    dtype = numeric.dtype(dtype)

TypeError: 'numpy.dtype[bool_]' object is not callable


During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File /usr/lib/python3.10/site-packages/spyder_kernels/customize/spyderpdb.py:776 in run
    super(SpyderPdb, self).run(cmd, globals, locals)

  File /usr/lib/python3.10/bdb.py:597 in run
    exec(cmd, globals, locals)

  File ~/Documents/code_PSA/PSAwork/main_harness_tool.py:612 in <module>
    dict_results = run_main()

  File ~/Documents/code_PSA/PSAwork/main_harness_tool.py:579 in run_main
    T, DICT_SAVE_ALL_RESULT = solve_problem(DICT_IMPORT)

  File ~/Documents/code_PSA/PSAwork/main_harness_tool.py:54 in solve_problem
    solver = select_solver(dict_import['SOLVER_DICT'])

  File ~/Documents/code_PSA/PSAwork/main_harness_tool.py:372 in select_solver
    import solver.solver_rad_conv_naked_free2 as solver

  File ~/Documents/code_PSA/PSAwork/solver/solver_rad_conv_naked_free2.py:25 in <module>
    import thermal_resistances as therm_res

  File ~/Documents/code_PSA/PSAwork/thermal_resistances.py:9 in <module>
    import scipy.integrate as scint

  File /usr/lib/python3.10/site-packages/scipy/integrate/__init__.py:96 in <module>
    from ._bvp import solve_bvp

  File /usr/lib/python3.10/site-packages/scipy/integrate/_bvp.py:8 in <module>
    from scipy.sparse.linalg import splu

  File /usr/lib/python3.10/site-packages/scipy/sparse/linalg/__init__.py:120 in <module>
    from ._isolve import *

  File /usr/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__init__.py:7 in <module>
    from .lsqr import lsqr

  File /usr/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/lsqr.py:58 in <module>
    eps = np.finfo(np.float64).eps

  File /usr/lib/python3.10/site-packages/numpy/core/getlimits.py:462 in __new__
    dtype = numeric.dtype(type(dtype))

TypeError: 'numpy.dtype[bool_]' object is not callable

Versions

  • Spyder version: 5.3.0 None
  • Python version: 3.10.4 64-bit
  • Qt version: 5.15.2
  • PyQt5 version: 5.15.6
  • Operating System: Linux 5.4.188-1-MANJARO

Dependencies

# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  2.0.0 (OK)
cookiecutter >=1.6.0          :  1.7.3 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.31.1              :  8.2.0 (OK)
jedi >=0.17.2                 :  0.18.1 (OK)
jellyfish >=0.7               :  0.9.0 (OK)
jsonschema >=3.2.0            :  3.2.0 (OK)
keyring >=17.0.0              :  23.4.0 (OK)
nbconvert >=4.0               :  6.4.5 (OK)
numpydoc >=0.6.0              :  1.1.0 (OK)
parso >=0.7.0                 :  0.8.2 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.9.0 (OK)
pygments >=2.0                :  2.11.2 (OK)
pylint >=2.5.0                :  2.13.4 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.4.1                 :  1.4.1 (OK)
pylsp_black >=1.2.0           :  1.2.0 (OK)
qdarkstyle >=3.0.2            :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.2.1 (OK)
qtawesome >=1.0.2             :  1.1.0 (OK)
qtconsole >=5.3.0             :  5.3.0 (OK)
qtpy >=2.0.1                  :  2.0.1 (OK)
rtree >=0.9.7                 :  0.9.7 (OK)
setuptools >=49.6.0           :  59.4.0 (OK)
sphinx >=0.6.6                :  4.5.0 (OK)
spyder_kernels >=2.3.0;<2.4.0 :  2.3.0 (OK)
textdistance >=4.2.0          :  4.2.2 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  0.10.7 (OK)
xdg >=0.26                    :  0.27 (OK)
zmq >=17                      :  22.3.0 (OK)

# Optional:
cython >=0.21                 :  0.29.28 (OK)
matplotlib >=3.0.0            :  3.5.1 (OK)
numpy >=1.7                   :  1.22.3 (OK)
pandas >=1.1.1                :  1.4.2 (OK)
scipy >=0.17.0                :  1.8.0 (OK)
sympy >=0.7.3                 :  1.10.1 (OK)
@ccordoba12
Copy link
Member

Hey @Ptiji, thanks for reporting. This seems like an error in Numpy, perhaps because you installed it with pip at some point. So you need to look for all places where you could have installed Numpy before and remove it.

Furthermore, errors with Arch Linux or its derivatives need to reported to its maintainers because its Spyder package is always semi-broken, i.e. some parts work fine on it and others are totally broken. I think the Arch maintainers are aware that they are distributing a broken Spyder package, but (I don't know why) they do it anyway, which is really awful.

@Ptiji
Copy link
Author

Ptiji commented May 28, 2022

Thank you @ccordoba12 for your response. I check all my install, I have an unique numpy. I tried to uninstall and reinstall with pip, I have already the error. After another uninstall and reinstall with pacman, I have again this error.

I find this, I think that explain my error :
python/cpython#90693

@ccordoba12
Copy link
Member

Please see issue #18054 for a possible explanation for this bug.

@Ptiji
Copy link
Author

Ptiji commented Jun 28, 2022

@ccordoba12 Problem solved with the update of pandas 1.4.3.

@ccordoba12
Copy link
Member

Great! Thanks for letting us know about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants