Comments (5)
What does your command line look like?
from pytm.
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.
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.
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.
thanks for the report! I'll take a look at it as soon as time permits.
from pytm.
Related Issues (20)
- docker and makefile broken HOT 1
- Documentation missing Controls class HOT 3
- SIDs prefix meaning HOT 2
- Error with make image HOT 2
- How are threats named, e.g., INPXX or AAXX? HOT 4
- How are "target" and its relevant "condition" extracted from a particular threat? HOT 5
- Documentation for attributes HOT 5
- Suggest to support converting c4 models into pytm HOT 7
- Use RAAML for threat models HOT 3
- Is the makefile broken? HOT 3
- Question: What's the purpose of defining trust boundary? HOT 7
- Got an error "AttributeError: 'str' object has no attribute 'name'" when using the "--sqldump SQLDUMP". HOT 2
- Cannot override findings, threats remain, DFD impacted, exception thrown for overrides len > 1 HOT 16
- pytm --report gives an error HOT 4
- Replace custom template engine with Jinja2 HOT 1
- README.md, section Currently Supported Threats, needs a legend HOT 7
- Enhancement request: move pyDAL to local import HOT 4
- Alternative format for threat lib for better readability and editing HOT 5
- AC22 Credential Aging review HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytm.