Error in converting a dotfile to image by graphviz - python

I made a tree graph by anytree module and I want to get a png file out of it. I tried graphviz (dotfile to png) but got an error:
What is the problem?
Traceback (most recent call last):
File "<pyshell#14>", line 1, in <module>
BOM.treegraph()
File "C:\Users\Ali\Downloads\test.test.succ4.py", line 33, in treegraph
DotExporter (vars()[BOM.a[0].product]).to_picture ('udo.png')
File "C:\Users\Ali\AppData\Local\Programs\Python\Python37-32\lib\site-packages\anytree\exporter\dotexporter.py", line 232, in to_picture
check_call(cmd)
File "C:\Users\Ali\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 342, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Users\Ali\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 323, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Users\Ali\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "C:\Users\Ali\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 1178, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

Related

Error when trying to use playsound to play music

I'm trying to play sound using playsound. Here is the code I have.
playsound('Chris Christodoulou - Coalescence Risk of Rain (2013).mp3')
When it gets to this code though, I get this error.
Traceback (most recent call last):
File "main.py", line 19, in <module>
playsound('Chris Christodoulou - Coalescence Risk of Rain (2013).mp3')
File "/home/runner/CrushingUntriedSet/venv/lib/python3.8/site-packages/playsound.py", line 254, in <lambda>
playsound = lambda sound, block = True: _playsoundAnotherPython('/usr/bin/python3', sound, block, macOS = False)
File "/home/runner/CrushingUntriedSet/venv/lib/python3.8/site-packages/playsound.py", line 229, in _playsoundAnotherPython
t.join()
File "/home/runner/CrushingUntriedSet/venv/lib/python3.8/site-packages/playsound.py", line 218, in join
raise self.exc
File "/home/runner/CrushingUntriedSet/venv/lib/python3.8/site-packages/playsound.py", line 211, in run
self.ret = self._target(*self._args, **self._kwargs)
File "/home/runner/CrushingUntriedSet/venv/lib/python3.8/site-packages/playsound.py", line 226, in <lambda>
t = PropogatingThread(target = lambda: check_call([otherPython, playsoundPath, _handlePathOSX(sound) if macOS else sound]))
File "/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/lib/python3.8/subprocess.py", line 359, in check_call
retcode = call(*popenargs, **kwargs)
File "/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/lib/python3.8/subprocess.py", line 340, in call
with Popen(*popenargs, **kwargs) as p:
File "/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/python3'
Can you help me understand what this means and how I can fix this?

Guesslangtools: FileNotFoundError: [Errno 2] No such file or directory: 'timeout'

I'm using Guesslangtools on my Mac in order to create a dataset.
When the execution reaches the step "Download chosen repositories" I'm hitting the following error:
Could this error be in any way related to Python 9?
I would appreciate suggestions on how to fix this.
"""
Traceback (most recent call last):
File "/usr/local/Cellar/python#3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/usr/local/lib/python3.9/site-packages/guesslangtools/common.py", line 264, in _apply
return method(item, *other_args, **keywords)
File "/usr/local/lib/python3.9/site-packages/guesslangtools/workflow/github_repositories.py", line 130, in _clone_repository
result = run(command, stdout=PIPE, stderr=PIPE)
File "/usr/local/Cellar/python#3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/Cellar/python#3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/Cellar/python#3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'timeout'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/gltool", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/guesslangtools/__main__.py", line 153, in main
run_workflow(config)
File "/usr/local/lib/python3.9/site-packages/guesslangtools/app.py", line 15, in run_workflow
github_repositories.download(config)
File "/usr/local/lib/python3.9/site-packages/guesslangtools/common.py", line 175, in wrapped
result = func(config, *args, **kw)
File "/usr/local/lib/python3.9/site-packages/guesslangtools/workflow/github_repositories.py", line 105, in download
for step, row in enumerate(pool_map(_clone_repository, rows, config), 1):
File "/usr/local/lib/python3.9/site-packages/guesslangtools/common.py", line 255, in pool_map
for result in pool.imap_unordered(_apply, iterable):
File "/usr/local/Cellar/python#3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 870, in next
raise value
FileNotFoundError: [Errno 2] No such file or directory: 'timeout'```
it’s likely because the GNU timeout program does not exist on the system that is running the test. timeout is part of the GNU Coreutils, so make sure that is installed on the system.
$ brew install coreutils # Mac OS X
then add a "gnubin" directory to your PATH, for example:
$ export PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH"

language-check gives OSError: [WinError 87] The parameter is incorrect

I am trying to use language-check a link
I get error on line
tool = language_check.LanguageTool('en-US')
I am getting this error:
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
tool = language_check.LanguageTool('en-US')
File "C:\Users\IMI-Nidhi\AppData\Local\Programs\Python\Python37\lib\site-packages\language_check\__init__.py", line 196, in __init__
self._start_server_on_free_port()
File "C:\Users\IMI-Nidhi\AppData\Local\Programs\Python\Python37\lib\site-packages\language_check\__init__.py", line 333, in _start_server_on_free_port
cls._start_local_server()
File "C:\Users\IMI-Nidhi\AppData\Local\Programs\Python\Python37\lib\site-packages\language_check\__init__.py", line 357, in _start_local_server
startupinfo=startupinfo
File "C:\Users\IMI-Nidhi\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 756, in __init__
restore_signals, start_new_session)
File "C:\Users\IMI-Nidhi\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 1160, in _execute_child
startupinfo)
OSError: [WinError 87] The parameter is incorrect
What's wrong, and what can I do to fix this?

Getting OSError: [Errno 2] No such file or directory

I try to use osm-bundler:
ubuntu: ~/osm-bundler$ ./RunBundler.py —photos="/home/ubuntu/photo"
Working directory created: /home/ubuntu/osm-bundler/output/osm-bundler-o1drFG
BundlerMatching executable path: /home/ubuntu/osm-bundler/software/bundler/KeyMatchFull
Sift executable path: /home/ubuntu/osm-bundler/software/sift-lowe/sift
but i get an error:
Processing photo 'IMGP3417.jpg':
Copy of the photo has been scaled down to 1200x900
Traceback (most recent call last):
File "./RunBundler.py", line 10, in <module>
manager.preparePhotos()
File "/home/ubuntu/osm-bundler/osmbundler/__init__.py", line 168, in preparePhotos
self._preparePhoto(photoInfo)
File "/home/ubuntu/osm-bundler/osmbundler/__init__.py", line 278, in _preparePhoto
self.extractFeatures(photo)
File "/home/ubuntu/osm-bundler/osmbundler/__init__.py", line 345, in extractFeatures
self.featureExtractor.extract(photo, self.photoDict[photo])
File "/home/ubuntu/osm-bundler/osmbundler/features/siftlowe.py", line 25, in extract
p = subprocess.call(self.executable, **dict(stdin=photoFile, stdout=siftTextFile))
File "/usr/lib/python2.7/subprocess.py", line 523, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Lines 23,24, & 25 of siftlowe.py:
photoFile = open("%s.jpg.pgm" % photo, "rb")
siftTextFile = open("%s.key" % photo, "w")
subprocess.call(self.executable, **dict(stdin=photoFile, stdout=siftTextFile))
File permissions are set correctly.
It looks like you did only install osm-bundler.zip and not osm-budler-full.zip. The line with the self.executable tries to execute sift, which is expected at /home/ubuntu/osm-bundler/software/sift-lowe/sift. This is most probably not installed (I tried it myself with osm-bundler.zip and this was missing).

Error while import novaclient library to python

I am importing novalient API library to python 2.7.3 as follows
from novaclient.v1_1 import client
when i try this this , it gives me following error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/novaclient/__init__.py", line 18, in <module>
__version__ = pbr.version.VersionInfo('python-novaclient').version_string()
File "/usr/local/lib/python2.7/dist-packages/pbr/version.py", line 78, in version_string
for part in self.release_string().split('.'):
File "/usr/local/lib/python2.7/dist-packages/pbr/version.py", line 70, in release_string
self.release = self._get_version_from_pkg_resources()
File "/usr/local/lib/python2.7/dist-packages/pbr/version.py", line 62, in _get_version_from_pkg_resources
return packaging.get_version(self.package)
File "/usr/local/lib/python2.7/dist-packages/pbr/packaging.py", line 861, in get_version
version = _get_version_from_git(pre_version)
File "/usr/local/lib/python2.7/dist-packages/pbr/packaging.py", line 802, in _get_version_from_git
git_dir = _get_git_directory()
File "/usr/local/lib/python2.7/dist-packages/pbr/packaging.py", line 215, in _get_git_directory
return _run_shell_command(['git', 'rev-parse', '--git-dir'])
File "/usr/local/lib/python2.7/dist-packages/pbr/packaging.py", line 204, in _run_shell_command
env=newenv)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
how to solve this issue? Is this a version related issue ?
You can read more about pbr (Python Build Reasonableness) here: http://docs.openstack.org/developer/pbr/

Categories

Resources