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?
Related
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"
I'm getting the following error when i try to run this simple python code
from pyvirtualdisplay import Display
disp = Display()
disp.start()
Error:
Traceback (most recent call last):
File "C:\Users\Saeed\Desktop\disp.py", line 4, in <module>
disp = Display()
File "C:\Users\Saeed\AppData\Local\Programs\Python\Python310\lib\site-packages\pyvirtualdisplay\display.py", line 54, in __init__
self._obj = cls(
File "C:\Users\Saeed\AppData\Local\Programs\Python\Python310\lib\site-packages\pyvirtualdisplay\xvfb.py", line 44, in __init__
AbstractDisplay.__init__(
File "C:\Users\Saeed\AppData\Local\Programs\Python\Python310\lib\site-packages\pyvirtualdisplay\abstractdisplay.py", line 85, in __init__
helptext = get_helptext(program)
File "C:\Users\Saeed\AppData\Local\Programs\Python\Python310\lib\site-packages\pyvirtualdisplay\util.py", line 13, in get_helptext
p = subprocess.Popen(
File "C:\Users\Saeed\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 966, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Saeed\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1435, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
Any help will be appreciated.
I have done the training with sklearn model along with mlflow and it generated the mlruns folder.
When I try to run mlflow ui it throws the following error.
There is bug in Git https://github.com/mlflow/mlflow/issues/1670 but doesn't have any solution.
Have anyone faced and have any work around for this ?
Tried re-installation.
Attaching the traces below.
Traceback (most recent call last):
File "c:\users\vivek.ananthan\anaconda3\envs\deepcpu\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\vivek.ananthan\anaconda3\envs\deepcpu\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Vivek.ananthan\Anaconda3\envs\deepcpu\Scripts\mlflow.exe\__main__.py", line 7, in <module>
File "c:\users\vivek.ananthan\anaconda3\envs\deepcpu\lib\site-packages\click\core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "c:\users\vivek.ananthan\anaconda3\envs\deepcpu\lib\site-packages\click\core.py", line 1062, in main
rv = self.invoke(ctx)
File "c:\users\vivek.ananthan\anaconda3\envs\deepcpu\lib\site-packages\click\core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\vivek.ananthan\anaconda3\envs\deepcpu\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\vivek.ananthan\anaconda3\envs\deepcpu\lib\site-packages\click\core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "c:\users\vivek.ananthan\anaconda3\envs\deepcpu\lib\site-packages\mlflow\cli.py", line 280, in ui
_run_server(backend_store_uri, default_artifact_root, host, port, None, 1)
File "c:\users\vivek.ananthan\anaconda3\envs\deepcpu\lib\site-packages\mlflow\server\__init__.py", line 138, in _run_server
exec_cmd(full_command, env=env_map, stream_output=True)
File "c:\users\vivek.ananthan\anaconda3\envs\deepcpu\lib\site-packages\mlflow\utils\process.py", line 34, in exec_cmd
child = subprocess.Popen(
File "c:\users\vivek.ananthan\anaconda3\envs\deepcpu\lib\subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "c:\users\vivek.ananthan\anaconda3\envs\deepcpu\lib\subprocess.py", line 1311, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
This question already has answers here:
pipenv Failing to Install Packages
(3 answers)
Closed 1 year ago.
I have already installed python's latest version and pipenv on Windows Powershell. When I try to install requests it is showing this error:
FileNotFoundError: [WinError 2] The system cannot find the file specified
ValueError: Not a valid python path: 'C:/ProgramData/Anaconda3/python.exe'
Full error code:
Traceback (most recent call last):
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 618, in parse_executable
result_version = get_python_version(path)
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\utils.py", line 105, in get_python_version
c = subprocess.Popen(version_cmd, **subprocess_kwargs)
File "c:\python39\lib\subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "c:\python39\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Python39\Scripts\pipenv.exe\__main__.py", line 7, in <module>
File "C:\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "C:\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "C:\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "C:\Python39\Lib\site-packages\pipenv\vendor\click\decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "C:\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "C:\Python39\Lib\site-packages\pipenv\vendor\click\decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\python39\lib\site-packages\pipenv\cli\command.py", line 233, in install
retcode = do_install(
File "c:\python39\lib\site-packages\pipenv\core.py", line 1920, in do_install
ensure_project(
File "c:\python39\lib\site-packages\pipenv\core.py", line 576, in ensure_project
ensure_virtualenv(
File "c:\python39\lib\site-packages\pipenv\core.py", line 498, in ensure_virtualenv
python = ensure_python(three=three, python=python)
File "c:\python39\lib\site-packages\pipenv\core.py", line 388, in ensure_python
path_to_python = find_a_system_python(python)
File "c:\python39\lib\site-packages\pipenv\core.py", line 350, in find_a_system_python
return next(iter(finder.find_all_python_versions()), None)
File "c:\python39\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 312, in find_all_python_versions
python_version_dict = getattr(self.system_path, "python_version_dict", {})
File "c:\python39\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 120, in system_path
self._system_path = self.create_system_path()
File "c:\python39\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 82, in create_system_path
return pyfinder_path.SystemPath.create(
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 682, in create
instance = instance._run_setup()
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 233, in _run_setup
new_instance = new_instance._setup_windows()
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 411, in _setup_windows
windows_finder = WindowsFinder.create()
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\windows.py", line 146, in create
return cls()
File "<attrs generated init pythonfinder.models.windows.WindowsFinder>", line 13, in __init__
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\windows.py", line 113, in get_versions
versions[py_version.version_tuple[:5]] = base_dir
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 365, in __getattribute__
result = super(PythonVersion, self).__getattribute__(key)
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 430, in version_tuple
self.patch,
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 375, in __getattribute__
instance_dict = self.parse_executable(executable)
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 620, in parse_executable
raise ValueError("Not a valid python path: %r" % path)
ValueError: Not a valid python path: 'C:/ProgramData/Anaconda3/python.exe'
It seems like you have two different Python distributions installed on your system: the Python 3.9 in C:\Python39\ and the Anaconda Python in C:/ProgramData/Anaconda3/. There is a conflict between them.
I recommend that you use one of them only - the Anaconda or the official Python, and uninstall another.
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