pytm icon indicating copy to clipboard operation
pytm copied to clipboard

pytm --report gives an error

Open ccc17as opened this issue 2 years ago • 4 comments

Running on a Mac. I could execute the dfd and sequence flow diagram but when trying to generate a report I get the below error,

python3 tm.py --report /docs/baseline.md Traceback (most recent call last): File "/tm.py", line 127, in tm.process() File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pytm/pytm.py", line 1062, in process print(self.report(result.report)) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pytm/pytm.py", line 1003, in report with open(template_path) as file: ^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/docs/baseline.md'

ccc17as avatar Oct 26 '23 22:10 ccc17as

Hi

The problem is that you run the command with the file /docs/baseline.md, which is a path to a file named baseline.md in a folder named docs in the root folder (/), this is a path to an unexciting file. This is most likely not what you want to do.

What you need to do is download a template file from https://github.com/izar/pytm/tree/master/docs . For example https://github.com/izar/pytm/blob/master/docs/basic_template.md and then use the path where you have downloaded the file to.

raphaelahrens avatar Oct 27 '23 20:10 raphaelahrens

Try docs rather than /docs ?

izar avatar Oct 27 '23 23:10 izar

@ccc17as Were you able to make it work?

raphaelahrens avatar Oct 31 '23 06:10 raphaelahrens

Or try python3 tm.py --report ./docs/baseline.md

Enigmatyk avatar Nov 10 '23 12:11 Enigmatyk