Code Monkey home page Code Monkey logo

Comments (7)

mpdehaan avatar mpdehaan commented on May 20, 2024

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.

from _old_vespene.

mpdehaan avatar mpdehaan commented on May 20, 2024

essentially it just needs something like this:

if type(value) == dict:
    value = json.dumps(value)

from _old_vespene.

mpdehaan avatar mpdehaan commented on May 20, 2024

or better, probably:

value = json.dumps(value, indent=4)

(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)

from _old_vespene.

tommy-couzens avatar tommy-couzens commented on May 20, 2024

Thanks for the quick reply, unfortunately I do not know python very well so will not be having a go at it myself.

from _old_vespene.

mpdehaan avatar mpdehaan commented on May 20, 2024

No problem!

from _old_vespene.

mpdehaan avatar mpdehaan commented on May 20, 2024

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!

from _old_vespene.

mpdehaan avatar mpdehaan commented on May 20, 2024

Apologies on losing track of this one, I've just pushed the two line fix mentioned above.

Thanks!

from _old_vespene.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.