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

line profiler error with Spyder 6 #91

Closed
mg3146 opened this issue Jan 13, 2024 · 4 comments
Closed

line profiler error with Spyder 6 #91

mg3146 opened this issue Jan 13, 2024 · 4 comments
Assignees
Milestone

Comments

@mg3146
Copy link

mg3146 commented Jan 13, 2024

It seems that there is an import error with Spyder 6 and the line profiler

spyder_line_profiler: cannot import name 'get_run_configuration' from 'spyder.plugins.run.widgets' (C:\ProgramData\anaconda3\envs\sitka_boost_spyder\lib\site-packages\spyder\plugins\run\widgets.py)
Traceback (most recent call last):
  File "C:\ProgramData\anaconda3\envs\sitka_boost_spyder\lib\site-packages\spyder\app\find_plugins.py", line 67, in find_external_plugins
    mod = importlib.import_module(entry_point.module_name)
  File "C:\ProgramData\anaconda3\envs\sitka_boost_spyder\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "C:\ProgramData\anaconda3\envs\sitka_boost_spyder\lib\site-packages\spyder_line_profiler\spyder\plugin.py", line 29, in <module>
    from spyder_line_profiler.spyder.confpage import SpyderLineProfilerConfigPage
  File "C:\ProgramData\anaconda3\envs\sitka_boost_spyder\lib\site-packages\spyder_line_profiler\spyder\confpage.py", line 21, in <module>
    from .widgets import SpyderLineProfilerWidget
  File "C:\ProgramData\anaconda3\envs\sitka_boost_spyder\lib\site-packages\spyder_line_profiler\spyder\widgets.py", line 37, in <module>
    from spyder.plugins.run.widgets import get_run_configuration
ImportError: cannot import name 'get_run_configuration' from 'spyder.plugins.run.widgets' (C:\ProgramData\anaconda3\envs\sitka_boost_spyder\lib\site-packages\spyder\plugins\run\widgets.py)
@jitseniesen
Copy link
Member

Thanks for the report. It does look like we have to update the plugin, but I suspect there still might be changes to this part of spyder before version 6 is out.

@jitseniesen jitseniesen self-assigned this Jan 16, 2024
@jitseniesen jitseniesen added this to the v0.4.0 milestone Jan 16, 2024
@jitseniesen
Copy link
Member

I believe this is already fixed in PR #77. However, this PR is only included in the master branch and not in any of the released versions. The history is misleading: we first planned to include it in version 0.3.2 of the plugin but then we changed our minds.

@jitseniesen jitseniesen closed this as not planned Won't fix, can't repro, duplicate, stale Apr 17, 2024
@mg3146
Copy link
Author

mg3146 commented May 3, 2024

sorry, so do you know if its currently working now?

@jitseniesen
Copy link
Member

The plugin works with the alpha version of Spyder 6 if you install spyder-line-profiler from source (using the master branch). The plugin does not work with Spyder 6 if you install the released version of spyder-line-profiler (currently, version 0.3.2).

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

No branches or pull requests

2 participants