-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Show internal errors in a QMessageBox #4040
PR: Show internal errors in a QMessageBox #4040
Conversation
I dont think a QMessageBox will do then, you could create a custom dialog with a QTableView or something that would keep growing as more messages keep coming. |
1b379f4
to
7f2ad4c
Compare
@goanpeca Following your idea I found a way QMessageBox could be updated continuously 😄 |
👍 |
@ccordoba12 do we want rich text on the details or not? and should they be links to the actual files? Do we want to add a submit button so users can submit that error directly? With that is that the issue tracker can start to grow a lot, which is good and bad at the same time! |
Perhaps not because that could confuse users. Besides, clickable links are already available in the internal console and that's mostly useful for us ;-) What we could have is highlighted tracebacks, but we could leave that for another PR.
Yep, that's really important to have ;-) |
8ba3cca
to
3d2dd80
Compare
@@ -2425,6 +2425,7 @@ def __get_current_color(self, cursor=None): | |||
|
|||
def in_comment_or_string(self, cursor=None): | |||
"""Is the cursor inside or next to a comment or string?""" | |||
raise Exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is making our tests to fail. It seems an artifact of the rebase, so please remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohhh! sorry, that was for testing, I didn't mean to commit that 🙈
@rlaverde, could we use an instance of CodeEditor to show the tracebacks? I think that would make the dialog more useful :-) |
1211dc4
to
b9edcb0
Compare
I used a customized QMessageBox, for embedding the CodeEditor I will have to rewrite it using a Dialog and implement the layout and functionality |
@ccordoba12 I would say for now this is good enough and as @rlaverde he would have to basically redo all his PR for what you are asking |
Ok, no problem, let's leave things as they are. One more thing: we need to preserve the old behavior when DEV is active. That's way more practical for us developers because traceback links are clickable in the Internal console. |
7ff4c1f
to
46e2ee4
Compare
Done, also when |
62fba7c
to
0325c46
Compare
0325c46
to
a4bba99
Compare
spyder/plugins/console.py
Outdated
self.msgbox_traceback = QMessageBox( | ||
QMessageBox.Critical, | ||
_('Error'), | ||
_("<b>Spyder-IDE has encountered a problem.</b>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the -IDE
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add a <br>
at the end.
spyder/plugins/console.py
Outdated
"Sorry for the inconvenience." | ||
"<b>Please tell us about this problem.</b>" | ||
"<br><br>" | ||
"You can submit this error to the github issue tracker"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change this to
You can automatically submit this error to our Github issues tracker.
Note: You need a Github account for that.
spyder/plugins/console.py
Outdated
parent=self) | ||
|
||
self.submit_btn = self.msgbox_traceback.addButton( | ||
_('Submit to github'), QMessageBox.YesRole) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
github
-> Github
spyder/plugins/console.py
Outdated
_('Error'), | ||
_("<b>Spyder-IDE has encountered a problem.</b>" | ||
"Sorry for the inconvenience." | ||
"<b>Please tell us about this problem.</b>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this line.
I added some minor formatting comments. After that, I think this is ready! |
I like it a lot, thanks! @goanpeca, what do you say? |
Fixes: #1525
This isn't ready, I implemented but the behavior isn't the expected, the QMessageBox is shown but for every single line of the traceback (becausetraceback_available
signal is emitted for every line).any ideas of how I could fix this?I implemented using a QMessageBox with non modal behavior