Giter Site home page Giter Site logo

Comments (5)

slzatz avatar slzatz commented on June 14, 2024

Note that I truncated all the timestamps to integers and am continuing to see the same type of error in C:\Python34\lib\json\decoder.py

from flywheel.

stevearc avatar stevearc commented on June 14, 2024

So what appears to be happening is the model is attempting to load values that are not specified in the schema because there are some additional fields present in the data. It will check to see if that field is a int/float/set, and if not, it will do a json.loads. When you look at your data, are there any fields present other than artist and ts?

from flywheel.

slzatz avatar slzatz commented on June 14, 2024

There are other fields like title and album. I have just added them to the model and the query does work. However, since it's a NoSQL database and records could have additional fields, I am not sure why the json.loads fails but, in any event, adding the fields does enable the query to run. Thank you.

from flywheel.

stevearc avatar stevearc commented on June 14, 2024

The problem is that when I first wrote the library I tried to be too clever. In addition to saving the declared fields, Flywheel will also save any other properties on the model that don't begin or end with _. This means that when it loads the dynamo data, it will attempt to deserialize any undeclared fields. Which works fine if you only ever added data from the python models, but can cause problems in your case.

If you look over at the 0.5 branch, I'm removing that behavior for the eventual 0.5.0 release. It's too confusing and not very useful.

from flywheel.

slzatz avatar slzatz commented on June 14, 2024

Thanks for the explanation. I'll look at the 0.5 branch. Again, I want to thank you for your work -- using a syntax similar to sqlalchemy's made using flywheel very easy. I'll close this issue.

from flywheel.

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.