Opened 8 years ago
Closed 8 years ago
#18110 closed enhancement (fixed)
Improve "unable to convert string" error message
Reported by: | jdemeyer | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-6.6 |
Component: | user interface | Keywords: | sd66 |
Cc: | Merged in: | ||
Authors: | Jeroen Demeyer | Reviewers: | Karl-Dieter Crisman |
Report Upstream: | N/A | Work issues: | |
Branch: | 1a1976c (Commits, GitHub, GitLab) | Commit: | 1a1976cf76b570e2f6d667f7a894ee9dea19f303 |
Dependencies: | Stopgaps: |
Description
Change History (9)
comment:1 Changed 8 years ago by
Branch: | → u/jdemeyer/improve__unable_to_convert_string__error_message |
---|
comment:2 Changed 8 years ago by
Commit: | → abc5a70de3fd3007fc603fdf378164c4e31a3967 |
---|---|
Keywords: | sd66 added |
Status: | new → needs_review |
comment:3 follow-up: 5 Changed 8 years ago by
Only one question:
+ if isinstance(x, basestring): + from sage.misc.sage_eval import sage_eval
but there is no corresponding import for y
, so in theory there could be some situation where x
wasn't a basestring (whatever that is) but y
was. ? Otherwise looks good.
comment:5 follow-up: 8 Changed 8 years ago by
Reviewers: | → Karl-Dieter Crisman |
---|---|
Status: | needs_review → needs_work |
Replying to kcrisman:
Only one question:
+ if isinstance(x, basestring): + from sage.misc.sage_eval import sage_evalbut there is no corresponding import for
y
, so in theory there could be some situation wherex
wasn't a basestring (whatever that is) buty
was. ?
Good catch. Interestingly, that error was caught by the except NameError:
...
comment:6 Changed 8 years ago by
Commit: | abc5a70de3fd3007fc603fdf378164c4e31a3967 → 1a1976cf76b570e2f6d667f7a894ee9dea19f303 |
---|
Branch pushed to git repo; I updated commit sha1. New commits:
1a1976c | Import sage_eval
|
comment:7 Changed 8 years ago by
Status: | needs_work → needs_review |
---|
comment:8 Changed 8 years ago by
Status: | needs_review → positive_review |
---|
Good catch.
Otherwise all is well.
Interestingly, that error was caught by the
except NameError:
...
LOL
comment:9 Changed 8 years ago by
Branch: | u/jdemeyer/improve__unable_to_convert_string__error_message → 1a1976cf76b570e2f6d667f7a894ee9dea19f303 |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
New commits:
Improve "unable to convert string" error message