-
Notifications
You must be signed in to change notification settings - Fork 68
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
Importing a .vespene file the variables are stored using single quotes instead of double quotes making the json invalid #99
Comments
Hi @AicyDC - it looks like I didn't actually try using the "variables" portion of the .vespene file - good catch and thanks for the report. The code in question is https://github.com/vespene-io/vespene/blob/master/vespene/workers/importer.py As you can see, it has no special value handling in 'attr_manage()' for the variables field, and it should. What we should do is check if the type of any field is a dict, and if so, save the JSON version of that value. What is happening is you are getting the stringification of the dictionary field, which is obviously no good. I should be able to get to this in the next few days unless you want to have a go at it. |
essentially it just needs something like this:
|
or better, probably:
(This preserves format because we are still storing those as text for slightly better DB compatibility, and because of some issues with the forms code and the JSON field class) |
Thanks for the quick reply, unfortunately I do not know python very well so will not be having a go at it myself. |
No problem! |
Just wanted to say I haven't forgotten about this one. Various other things coming up but this should still be an easy change. Thanks for all the forum feedback! |
Apologies on losing track of this one, I've just pushed the two line fix mentioned above. Thanks! |
Bug description
When importing a project, via the organisations tab in the GUI, using a .vespene I got an error when the project running and looked at the variables and saw they were stored in single quotes instead of double quotes. After changing it to double quotes the project ran fine.
Steps to reproduce
My .vespene file is the following:
This builds me a project that I should then be able to run.
Actual behavior
After importing the variables in the project are as follows:
When I run the project I get this error pop up:
I changed the single quotes to double quotes manually as so:
And the project without problems.
Operating system and version
Amazon Linux 2
The text was updated successfully, but these errors were encountered: