Initial rope error notification is uninformative
See original GitHub issueEnvironment data
- VS Code version: 1.25.1 1dfc5e557209371715f655691b1235b6b26a06be x64
- Extension version (available under the Extensions sidebar): 2018.7.1 (23 July 2018)
- OS and version: Mac OS High Sierra 10.13.6 (17G65)
- Python version (& distribution if applicable, e.g. Anaconda): XXX
- Type of virtual environment used: venv
- Relevant/affected Python packages and their versions: rope
Actual behavior
When rope fails to refactor, an error notification appears with Cannot perform refactoring using selected element(s)...
. Which doesn’t help debug the situation
Expected behavior
The error notification should already include the helpful error information. in this case Refactor failed. invalid Syntax in...
Steps to reproduce:
- Open a python file
- Insert code with a syntax error. i/e
a++
- Select the code and try to extract a variable
- Open the notification to show the full error log and the actual helpful info
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
##########Refactor Output##########
Error in refactoring:
Refactor failed. Syntax error in file <server/push_notifications/__init__.py> line <23>: invalid syntax
[<FrameSummary file refactor.py, line 294 in watch>, <FrameSummary file refactor.py, line 279 in _process_request>, <FrameSummary file refactor.py, line 223 in _extractVariable>, <FrameSummary file refactor.py, line 117 in refactor>, <FrameSummary file refactor.py, line 163 in onRefactor>, <FrameSummary file /Users/tomer/hub/venv/lib/python3.6/site-packages/rope/refactor/extract.py, line 68 in get_changes>, <FrameSummary file /Users/tomer/hub/venv/lib/python3.6/site-packages/rope/refactor/extract.py, line 101 in __init__>, <FrameSummary file /Users/tomer/hub/venv/lib/python3.6/site-packages/rope/base/project.py, line 116 in get_pymodule>, <FrameSummary file /Users/tomer/hub/venv/lib/python3.6/site-packages/rope/base/pycore.py, line 142 in resource_to_pyobject>, <FrameSummary file /Users/tomer/hub/venv/lib/python3.6/site-packages/rope/base/pycore.py, line 255 in get_pymodule>, <FrameSummary file /Users/tomer/hub/venv/lib/python3.6/site-packages/rope/base/pyobjectsdef.py, line 162 in __init__>, <FrameSummary file /Users/tomer/hub/venv/lib/python3.6/site-packages/rope/base/pyobjectsdef.py, line 191 in _init_source>]
Output from Console
under the Developer Tools
panel (toggle Developer Tools on under Help
)
workbench.main.js:sourcemap:2364 Cannot perform refactoring using selected element(s). (Refactor failed. Syntax error in file <server/push_notifications/__init__.py> line <23>: invalid syntax [<FrameSummary file refactor.py, line 294 in watch>, <FrameSummary file refactor.py, line 279 in _process_request>, <FrameSummary file refactor.py, line 223 in _extractVariable>, <FrameSummary file refactor.py, line 117 in refactor>, <FrameSummary file refactor.py, line 163 in onRefactor>, <FrameSummary file /Users/tomer/hub/venv/lib/python3.6/site-packages/rope/refactor/extract.py, line 68 in get_changes>, <FrameSummary file /Users/tomer/hub/venv/lib/python3.6/site-packages/rope/refactor/extract.py, line 101 in __init__>, <FrameSummary file /Users/tomer/hub/venv/lib/python3.6/site-packages/rope/base/project.py, line 116 in get_pymodule>, <FrameSummary file /Users/tomer/hub/venv/lib/python3.6/site-packages/rope/base/pycore.py, line 142 in resource_to_pyobject>, <FrameSummary file /Users/tomer/hub/venv/lib/python3.6/site-packages/...
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
IRS FATCA Report Notifications Frequently Asked Questions ...
*Note: As of March 24, 2018, the IRS is no longer issuing this notification. Any Invalid or duplicative DocRefIDs will result in an...
Read more >Error tracking with errors inbox - New Relic Documentation
Errors inbox provides a unified error tracking experience to detect and triage errors: View and triage issues across applications and services that your...
Read more >User Notification | Web Accessibility Initiative (WAI) | W3C
There are 2 errors in this form. The First name field is empty, it is a required field and must be filled in....
Read more >Error notifications: When Amazon Connect Rules action fails ...
When this happens, Amazon Connect sends error notifications using Amazon EventBridge events. Events are emitted on a best effort basis.
Read more >Error on initial push notification subscription
It does make sense to inform the user since there was already an initial registration process. However, the manner/language to deliver the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Closing as we plan to add refactoring to our language server, negating the need for Rope.
You give me too much credit 😜