ModuleNotFoundError: No module named 'diagrams.cli'
Diagrams installed with pip and miniconda. Linux.
Diagrams works fine running something like python mytest.py
$ which diagrams
/opt/miniconda3/bin/diagrams
$ which python
/opt/miniconda3/bin/python
$ which pip
/opt/miniconda3/bin/pip
The problem is using the binary diagrams:
$ /opt/miniconda3/bin/diagrams ~2.893s
Traceback (most recent call last):
File "/opt/miniconda3/bin/diagrams", line 5, in <module>
from diagrams.cli import main
ModuleNotFoundError: No module named 'diagrams.cli'
I can import libraries ...but I cannot find any package/module named diagrams.cli, the executable file diagrams has this content:
#!/opt/miniconda3/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from diagrams.cli import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
Where the main function should be imported from?
Am I missing something?
Thanks
No official CLI is yet, but this line was added by mistake. I'm very sorry about that.
[tool.poetry.scripts]
diagrams="diagrams.cli:main"
There is a PR working on it, but not merged yet: https://github.com/mingrammer/diagrams/pull/524
The PR were merged I close the issue.
I've tried to update Diagrams, but I have the same problem
Still an issue
@Gabri @ehanoc The PR is merged, there's still no new release with this changes I closed the issue as it's related to merge a PR, it's ok to open a new issue if there's problem after the code will be released. If you tested on the master branch that you build by yourself, please put more details. If you just upgrade to the latest version i.e https://github.com/mingrammer/diagrams/releases/tag/v0.24.4 the PR is not included yet.
Thanks for your patience and hope we will have enough time to add more feature and release soon. You can register to get release notification if you can wait or build your own version if you really need it now.
@mingrammer @gabriel-tessier Do you know when will be the next release?