Code Monkey home page Code Monkey logo

Comments (5)

izar avatar izar commented on May 29, 2024

What does your command line look like?

from pytm.

jmrenshaw avatar jmrenshaw commented on May 29, 2024

Hi, I am not using the command line, I am using the load function imported to a python file to create a model object.

from pytm.

izar avatar izar commented on May 29, 2024

I'll have to go back to that part of the code. Did you try to save a model as JSON and then load it back again?

from pytm.

jmrenshaw avatar jmrenshaw commented on May 29, 2024

Hi @izar , apologies for such a belated response on this! One thing I have tried is running your unit tests but renaming output.json to input.json as this is a much more complete model in terms of different functions. The test now fails with the following:

======================================================================
ERROR: test_json_loads (tests.test_pytmfunc.TestTM)

Traceback (most recent call last):
File "/home/jon/pytm_clone/tests/test_pytmfunc.py", line 343, in test_json_loads
tm = loads(contents)
File "/home/jon/pytm_clone/pytm/json.py", line 23, in loads
result = json.loads(s, object_hook=decode)
File "/usr/lib/python3.10/json/init.py", line 359, in loads
return cls(**kw).decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
File "/home/jon/pytm_clone/pytm/json.py", line 41, in decode
boundaries = decode_boundaries(data.pop("boundaries", []))
File "/home/jon/pytm_clone/pytm/json.py", line 61, in decode_boundaries
e = Boundary(name, **e)
File "/home/jon/pytm_clone/pytm/pytm.py", line 1769, in init
super().init(name, **kwargs)
File "/home/jon/pytm_clone/pytm/pytm.py", line 1301, in init
setattr(self, key, value)
File "/home/jon/pytm_clone/pytm/pytm.py", line 248, in set
raise ValueError(
ValueError: expecting an Controls value, got a <class 'dict'>


from pytm.

izar avatar izar commented on May 29, 2024

thanks for the report! I'll take a look at it as soon as time permits.

from pytm.

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.