-
Notifications
You must be signed in to change notification settings - Fork 41
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
numbers edited in bottom right panel are saved as strings in JSON file #112
Comments
When values in the PropertyEditor were changed by typing in new values, new values were saved as strings, which caused a crash when opening the saved file. This commit casts values of keys that should be floats to floats. Looked into UI-side validation (since right now the editor allows non-floats to be entered as a value) without much success; it seems that a change in PropertyEditorWidget.py (and associated classes) would need to be made. Fixes cadnano#112
This bug appears to have returned in the build from 5/29/2018. When I edit "minor groove" to be 150.00 instead of 180.00, it saves "150.00" as a string and crashes. Side request: could you set the default minor groove to be 150 instead of 180? |
Thanks @dave-doty for bringing this to our attention. It's probably a regression from the recent refactoring. Regarding the default minor groove: Now that we're transitioning to proximity-based crossovers derived from 3D coordinates, we've tried to select defaults that maintain backwards compatibility with previous versions of cadnano. I've hesitated to switch to a 150° default since it would make it very confusing/difficult to load and edit legacy designs. But we'll try to work out a solution, perhaps involving saving this into local user prefs. |
Hi @dave-doty, Like @sdouglas said, thanks for bringing this up with us. I'm trying to reproduce this and don't seem to be able to. Here's what I'm doing:
Cadnano seems to open without issue for me, and looking at the JSON file I see
for the VH that I added. To help us more easily track down this issue, could you let me know what steps I should follow to reproduce this? I'm running the most recent version of Thanks! |
Those are the exact steps I followed, but it saves "minor_groove_angle" as "150.00". I have commit ce6ff01 (pulled this morning). If it helps, I'm running Anaconda Python 3.6 on Windows 10. I ran "pip install cadnano" from within an Anaconda prompt for Python 3.6 (it has no pip3, just pip, but it's supposedly for the Python 3.6 installation), and then open cadnano by running "cadnano" from the Anaconda prompt. |
Hi @dave-doty, Thanks for the quick response and for the extra context. Right now the most recent version of cadnano is not on PyPI, so running
will in fact install an older version of cadnano, which I believe explains why you're still seeing this bug. Could you try running
instead to install cadnano from the most recent commit on GitHub and let us know if you're still seeing this issue after doing so? I think this ought to fix the issue you're seeing. |
If you edit by typing a numerical value associated to a helix in the bottom right panel, for instance, minor groove angle or length, it is saved as a string in the JSON file instead of a number, which crashes the next time the file is loaded.
This does not appear to be a problem if the value is edited by clicking the up-down arrows to adjust the value, only if the value is typed with the keyboard.
The text was updated successfully, but these errors were encountered: