Comments (6)
I came across the same issue on MacOSX that uses python version 2 by default. You need to make sure you are running version 3+ by default. After you get past this error you will have to install PyYaml.
from swagger_to_uml.
apt search python3-yaml
from swagger_to_uml.
Which Python version are you using? What is the error actual message (your message only indicates a file position)?
from swagger_to_uml.
@nlohmann Sorry, I didn't notice :( - I got exactly this message
File "swagger_to_uml.py", line 376
print(sw.uml, end='', flush=True)
^
SyntaxError: invalid syntax
I use a 2.7.12 version of Python - however I upgrade Python to 3.6 version and i got the same the new error message :-)
/opt/repos/swagger_to_uml# python3.6 swagger_to_uml.py petstore_example/swagger.json >petstore_example/swagger.puml
Traceback (most recent call last):
File "swagger_to_uml.py", line 24, in <module>
import yaml
ModuleNotFoundError: No module named 'yaml'
I tried to install python-yaml and i got
apt-get install python-yaml
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-yaml is already the newest version (3.11-3build1).
0 upgraded, 0 newly installed, 0 to remove and 138 not upgraded.
So probably i doing something wrong again :( :]
from swagger_to_uml.
Note you do not need to install all packages globally. This should work:
python3 -mvenv venv
venv/bin/pip3 install yaml
venv/bin/python3 swagger_to_uml.py
from swagger_to_uml.
@fenollp Thanks ;) for a hint :). It's alive ;).
@nlohmann I tried to call script thats way but i got a lot more of errors ;) - so I stay with @fenollp sollution :). Thanks for a great job :). I have a fresh new sandbox for swagger conversion ;).
from swagger_to_uml.
Related Issues (11)
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 swagger_to_uml.