OSError: [WinError 87] The parameter is incorrect - python

Trying to run python fabric 2 in windows 10
from fabric import task,SerialGroup,Connection
import os
USERNAME = os.getenv('USERNAME')
my_hosts = ["hostname"]
c = Connection(host="rg#host.com",connect_kwargs={"password":"abcd"})
#task
def test(c):
print(USERNAME)
c.run("echo hello")
Giving the below error
Traceback (most recent call last):
File "c:\users\rg\programs\python\python38\lib\runpy.py", line
194, in _run_module_as_main
return _run_code(code, main_globals, None, File "c:\users\rg\programs\python\python38\lib\runpy.py", line
87, in run_code
exec(code, run_globals) File
"C:\Users\rg\Programs\Python\Python38\Scripts\fab.exe_main.py",
line 7, in File
"c:\users\rg\programs\python\python38\lib\site-packages\invoke\program.py",
line 384, in run
self.execute() File
"c:\users\rg\programs\python\python38\lib\site-packages\invoke\program.py",
line 566, in execute
executor.execute(*self.tasks) File
"c:\users\rg\programs\python\python38\lib\site-packages\invoke\executor.py",
line 129, in execute
result = call.task(*args, **call.kwargs) File
"c:\users\rg\programs\python\python38\lib\site-packages\invoke\tasks.py",
line 127, in call
result = self.body(*args, **kwargs) File
"C:\Users\rg\Documents\Solr\python_scripts\Solr\fabfiles\fabfile.py",
line 10, in test
c.run("echo hello") File
"c:\users\rg\programs\python\python38\lib\site-packages\invoke\context.py",
line 95, in run
return self._run(runner, command, **kwargs) File
"c:\users\rg\programs\python\python38\lib\site-packages\invoke\context.py",
line 102, in _run
return runner.run(command, **kwargs) File
"c:\users\rg\programs\python\python38\lib\site-packages\invoke\runners.py",
line 363, in run
return self._run_body(command, **kwargs) File
"c:\users\rg\programs\python\python38\lib\site-packages\invoke\runners.py",
line 411, in _run_body
self.start(command, self.opts["shell"], self.env) File
"c:\users\rg\programs\python\python38\lib\site-packages\invoke\runners.py",
line 1271, in start
self.process = Popen( File "c:\users\rg\programs\python\python38\lib\subprocess.py",
line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds, File "c:\users\rg\programs\python\python38\lib\subprocess.py",
line 1311, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args, OSError: [WinError 87] The parameter is incorrect

This is a sort-of-a-bug in fabric (as of 2.6.0),
see the discussion here:
https://github.com/fabric/fabric/issues/2142
Apparently, it shows up with Python 3.8 or 3.9, but not with 3.6 or 3.7.
To get around it, you can use c.run("echo hello", replace_env=False).
This is OK for local calls, but can be problematic for remote calls, because it means that the remote session will see all environment variable values (some of which may be sensitive) of your local session.

Related

How to correct MLFlow UI FileNotFoundError: [WinError 2]?

I created an MLFlow tracking folder and logged metrics/parameters in the following way:
dir_parent = os.getcwd()
dir_mlflow = 'file:' + os.sep + os.path.join(dir_parent, 'mlflow_test')
mlflow.set_tracking_uri(dir_mlflow)
# log parameters in mlflow
mlflow.log_param('batch_size',args.batch_size)
mlflow.log_param('epochs',args.epochs)
mlflow.log_param('learning_rate',args.learning_rate)
# set up a callback function to track model results in training
class LogMetricsCallback(keras.callbacks.Callback):
def on_epoch_end(self, epoch, logs={}):
mlflow.log_metric('training_loss', logs['loss'], epoch)
mlflow.log_metric('training_accuracy', logs['accuracy'], epoch)
# get test metrics
test_loss, test_acc = model.evaluate(x_test, y_test, verbose=2)
mlflow.log_metric('test_loss', test_loss)
mlflow.log_metric('test_accuracy', test_acc)
# save model to mlflow
mlflow.keras.log_model(model, artifact_path = 'keras-model')
This creates a folder named mlflow_test which houses 3 folders: .trash, 0, and mlruns
How do I read and interact with the contents of this folder? How do I see my runs?
I tried navigating to the folder from the command line and using both the mlflow ui and mlflow ui --host 0.0.0.0 commands but I get the following error:
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\PJ\AppData\Roaming\Python\Python39\site-packages\mlflow\__main__.py", line 3, in <module>
cli.main()
File "C:\Users\PJ\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\PJ\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\PJ\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\PJ\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Users\PJ\AppData\Roaming\Python\Python39\site-packages\mlflow\cli.py", line 399, in server
_run_server(
File "C:\Users\PJ\AppData\Roaming\Python\Python39\site-packages\mlflow\server\__init__.py", line 161, in _run_server
_exec_cmd(full_command, extra_env=env_map, capture_output=False)
File "C:\Users\PJ\AppData\Roaming\Python\Python39\site-packages\mlflow\utils\process.py", line 95, in _exec_cmd
process = subprocess.Popen(
File "C:\Program Files\Python39\lib\subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\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
MLFlow version: 2.1.1
Python version: 3.9.5 64bit
Windows 10 OS

Any conda command shows this error report

$ conda info --envs
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/exceptions.py", line 1082, in __call__
return func(*args, **kwargs)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/cli/main.py", line 87, in _main
exit_code = do_call(args, p)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/cli/conda_argparse.py", line 84, in do_call
return getattr(module, func_name)(args, parser)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/cli/main_info.py", line 317, in execute
info_dict = get_info_dict(args.system)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/cli/main_info.py", line 135, in get_info_dict
_supplement_index_with_system(virtual_pkg_index)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/core/index.py", line 164, in _supplement_index_with_system
dist_name, dist_version = context.os_distribution_name_version
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/auxlib/decorators.py", line 268, in new_fget
cache[inner_attname] = func(self)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/base/context.py", line 863, in os_distribution_name_version
from conda._vendor.distro import id, version
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/_vendor/distro.py", line 1084, in <module>
_distro = LinuxDistribution()
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/_vendor/distro.py", line 599, in __init__
self._lsb_release_info = self._get_lsb_release_info() \
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/_vendor/distro.py", line 943, in _get_lsb_release_info
raise subprocess.CalledProcessError(code, cmd, stdout, stderr)
subprocess.CalledProcessError: Command 'lsb_release -a' returned non-zero exit status 1.
`$ /home/user/miniconda3/bin/conda info --envs`
An unexpected error has occurred. Conda has prepared the above report.
If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers?
[y/N]: y
Traceback (most recent call last):
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/exceptions.py", line 1082, in __call__
return func(*args, **kwargs)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/cli/main.py", line 87, in _main
exit_code = do_call(args, p)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/cli/conda_argparse.py", line 84, in do_call
return getattr(module, func_name)(args, parser)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/cli/main_info.py", line 317, in execute
info_dict = get_info_dict(args.system)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/cli/main_info.py", line 135, in get_info_dict
_supplement_index_with_system(virtual_pkg_index)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/core/index.py", line 164, in _supplement_index_with_system
dist_name, dist_version = context.os_distribution_name_version
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/auxlib/decorators.py", line 268, in new_fget
cache[inner_attname] = func(self)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/base/context.py", line 863, in os_distribution_name_version
from conda._vendor.distro import id, version
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/_vendor/distro.py", line 1084, in <module>
_distro = LinuxDistribution()
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/_vendor/distro.py", line 599, in __init__
self._lsb_release_info = self._get_lsb_release_info() \
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/_vendor/distro.py", line 943, in _get_lsb_release_info
raise subprocess.CalledProcessError(code, cmd, stdout, stderr)
subprocess.CalledProcessError: Command 'lsb_release -a' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/miniconda3/bin/conda", line 13, in <module>
sys.exit(main())
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/cli/main.py", line 155, in main
return conda_exception_handler(_main, *args, **kwargs)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/exceptions.py", line 1374, in conda_exception_handler
return_value = exception_handler(func, *args, **kwargs)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/exceptions.py", line 1085, in __call__
return self.handle_exception(exc_val, exc_tb)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/exceptions.py", line 1129, in handle_exception
return self.handle_unexpected_exception(exc_val, exc_tb)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/exceptions.py", line 1144, in handle_unexpected_exception
self._execute_upload(error_report)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/exceptions.py", line 1306, in _execute_upload
'User-Agent': self.user_agent,
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/exceptions.py", line 1104, in user_agent
return context.user_agent
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/auxlib/decorators.py", line 268, in new_fget
cache[inner_attname] = func(self)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/base/context.py", line 805, in user_agent
builder.append("%s/%s" % self.os_distribution_name_version)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/auxlib/decorators.py", line 268, in new_fget
cache[inner_attname] = func(self)
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/base/context.py", line 863, in os_distribution_name_version
from conda._vendor.distro import id, version
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/_vendor/distro.py", line 1084, in <module>
_distro = LinuxDistribution()
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/_vendor/distro.py", line 599, in __init__
self._lsb_release_info = self._get_lsb_release_info() \
File "/home/user/miniconda3/lib/python3.9/site-packages/conda/_vendor/distro.py", line 943, in _get_lsb_release_info
raise subprocess.CalledProcessError(code, cmd, stdout, stderr)
subprocess.CalledProcessError: Command 'lsb_release -a' returned non-zero exit status 1.
Hi, I keep getting this ERROR REPORT for any conda command (conda info, conda install, conda whatever).
I removed and re-installed anaconda but then I get the same error, so I removed everything and installed miniconda, then I re-installed miniconda, then I also re-installed Ubuntu.
None of the above clearly solved the problem and this ERROR REPORT comes and goes.
Any help would be appreciated.

Python subprocess line 1420 FileNotFoundError: [WinError 2] The system cannot find the file specified. Jupyter-Matlab notebook

I want to use Jupyter-matlab notebooks. I've downloaded Anaconda navigator and followed the steps from this web: http://jmlilly.net/jupyter-matlab Unfortunately, when I try to open a matlab notebook there is a kernel error.
I've been trying re-install anaconda, jupyter, matlab-kernel, change environment python version (2.7, 3.7, 3.8, 3.9) etc. but it doesn't work. Matlab version: R2021b and R2022a (tried both).
Full error traceback from jupyter:
Traceback (most recent call last):
File "C:\Users\lucas\anaconda3\lib\site-packages\tornado\web.py", line 1704, in _execute
result = await result
File "C:\Users\lucas\anaconda3\lib\asyncio\tasks.py", line 328, in __wakeup
future.result()
File "C:\Users\lucas\anaconda3\lib\site-packages\tornado\gen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\lucas\anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 74, in post
model = yield maybe_future(
File "C:\Users\lucas\anaconda3\lib\site-packages\tornado\gen.py", line 762, in run
value = future.result()
File "C:\Users\lucas\anaconda3\lib\site-packages\tornado\gen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\lucas\anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 98, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "C:\Users\lucas\anaconda3\lib\site-packages\tornado\gen.py", line 762, in run
value = future.result()
File "C:\Users\lucas\anaconda3\lib\site-packages\tornado\gen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\lucas\anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 110, in start_kernel_for_session
kernel_id = yield maybe_future(
File "C:\Users\lucas\anaconda3\lib\site-packages\tornado\gen.py", line 762, in run
value = future.result()
File "C:\Users\lucas\anaconda3\lib\asyncio\futures.py", line 201, in result
raise self._exception
File "C:\Users\lucas\anaconda3\lib\asyncio\tasks.py", line 256, in __step
result = coro.send(None)
File "C:\Users\lucas\anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 176, in start_kernel
kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self, **kwargs))
File "C:\Users\lucas\anaconda3\lib\site-packages\jupyter_client\utils.py", line 26, in wrapped
raise e
File "C:\Users\lucas\anaconda3\lib\site-packages\jupyter_client\utils.py", line 23, in wrapped
return loop.run_until_complete(future)
File "C:\Users\lucas\anaconda3\lib\site-packages\nest_asyncio.py", line 89, in run_until_complete
return f.result()
File "C:\Users\lucas\anaconda3\lib\asyncio\futures.py", line 201, in result
raise self._exception
File "C:\Users\lucas\anaconda3\lib\asyncio\tasks.py", line 256, in __step
result = coro.send(None)
File "C:\Users\lucas\anaconda3\lib\site-packages\jupyter_client\multikernelmanager.py", line 207, in _async_start_kernel
starter = ensure_async(km.start_kernel(**kwargs))
File "C:\Users\lucas\anaconda3\lib\site-packages\jupyter_client\utils.py", line 26, in wrapped
raise e
File "C:\Users\lucas\anaconda3\lib\site-packages\jupyter_client\utils.py", line 23, in wrapped
return loop.run_until_complete(future)
File "C:\Users\lucas\anaconda3\lib\site-packages\nest_asyncio.py", line 89, in run_until_complete
return f.result()
File "C:\Users\lucas\anaconda3\lib\asyncio\futures.py", line 201, in result
raise self._exception
File "C:\Users\lucas\anaconda3\lib\asyncio\tasks.py", line 256, in __step
result = coro.send(None)
File "C:\Users\lucas\anaconda3\lib\site-packages\jupyter_client\manager.py", line 79, in wrapper
raise e
File "C:\Users\lucas\anaconda3\lib\site-packages\jupyter_client\manager.py", line 71, in wrapper
out = await method(self, *args, **kwargs)
File "C:\Users\lucas\anaconda3\lib\site-packages\jupyter_client\manager.py", line 381, in _async_start_kernel
await ensure_async(self._launch_kernel(kernel_cmd, **kw))
File "C:\Users\lucas\anaconda3\lib\site-packages\jupyter_client\utils.py", line 26, in wrapped
raise e
File "C:\Users\lucas\anaconda3\lib\site-packages\jupyter_client\utils.py", line 23, in wrapped
return loop.run_until_complete(future)
File "C:\Users\lucas\anaconda3\lib\site-packages\nest_asyncio.py", line 89, in run_until_complete
return f.result()
File "C:\Users\lucas\anaconda3\lib\asyncio\futures.py", line 201, in result
raise self._exception
File "C:\Users\lucas\anaconda3\lib\asyncio\tasks.py", line 256, in __step
result = coro.send(None)
File "C:\Users\lucas\anaconda3\lib\site-packages\jupyter_client\manager.py", line 301, in _async_launch_kernel
connection_info = await self.provisioner.launch_kernel(kernel_cmd, **kw)
File "C:\Users\lucas\anaconda3\lib\site-packages\jupyter_client\provisioning\local_provisioner.py", line 204, in launch_kernel
self.process = launch_kernel(cmd, **scrubbed_kwargs)
File "C:\Users\lucas\anaconda3\lib\site-packages\jupyter_client\launcher.py", line 169, in launch_kernel
raise ex
File "C:\Users\lucas\anaconda3\lib\site-packages\jupyter_client\launcher.py", line 157, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\Users\lucas\anaconda3\lib\subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\lucas\anaconda3\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
I had the same problem. This post helped me to solve it. For some reason, the matlab kernel config file points to the wrong python location.
Solution
Edit the file %APPDATA%\jupyter\kernels\matlab\kernel.json so that the first argument points to the correct python executable. In my case from:
{"argv": ["/tmp/conda_envs/258853ccd52b78b326300497/bin/python", "-m", "matlab_kernel", ...
to
{"argv": ["C:\\Users\\YOURUSERNAME\\.conda\\envs\\ENVNAME\\python.exe", "-m", "matlab_kernel", ...
Or whatever is the correct python path to your environment (change YOURUSERNAME and ENVNAME). In windows you can find it using where python
Extra info
For debugging and finding the kernel.json file, I used
jupyter console --kernel matlab --debug

Receiving "Kernal Error" for reinstallation of Anaconda

Like many, I have reinstalled Anaconda after upgrading to MacOS Catalina. I did not 'uninstall' but deleted the folder (I am not a power user but an occasional user of python).
I did a clean install of Anaconda 3, and updated python to Python 3.8. When I start a notebook, I get the error message "Kernal Error."
Clicking on the "Kernal Error" button, I see the following message:
Traceback (most recent call last):
File "/Users/Glenn/Applications/anaconda3/lib/python3.8/site-packages/tornado/web.py", line 1703, in _execute
result = await result
File "/Users/Glenn/Applications/anaconda3/lib/python3.8/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/Users/Glenn/Applications/anaconda3/lib/python3.8/site-packages/notebook/services/sessions/handlers.py", line 69, in post
model = yield maybe_future(
File "/Users/Glenn/Applications/anaconda3/lib/python3.8/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/Users/Glenn/Applications/anaconda3/lib/python3.8/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/Users/Glenn/Applications/anaconda3/lib/python3.8/site-packages/notebook/services/sessions/sessionmanager.py", line 88, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "/Users/Glenn/Applications/anaconda3/lib/python3.8/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/Users/Glenn/Applications/anaconda3/lib/python3.8/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/Users/Glenn/Applications/anaconda3/lib/python3.8/site-packages/notebook/services/sessions/sessionmanager.py", line 100, in start_kernel_for_session
kernel_id = yield maybe_future(
File "/Users/Glenn/Applications/anaconda3/lib/python3.8/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/Users/Glenn/Applications/anaconda3/lib/python3.8/site-packages/notebook/services/kernels/kernelmanager.py", line 176, in start_kernel
kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self, **kwargs))
File "/Users/Glenn/Applications/anaconda3/lib/python3.8/site-packages/jupyter_client/multikernelmanager.py", line 186, in start_kernel
km.start_kernel(**kwargs)
File "/Users/Glenn/Applications/anaconda3/lib/python3.8/site-packages/jupyter_client/manager.py", line 308, in start_kernel
self.kernel = self._launch_kernel(kernel_cmd, **kw)
File "/Users/Glenn/Applications/anaconda3/lib/python3.8/site-packages/jupyter_client/manager.py", line 215, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/Users/Glenn/Applications/anaconda3/lib/python3.8/site-packages/jupyter_client/launcher.py", line 135, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/Users/Glenn/Applications/anaconda3/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Users/Glenn/Applications/anaconda3/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/anaconda2/envs/snakes/bin/python3'
But when I type 'python' in the terminal, I see that python 3.8 is installed:
Can anyone help me understand this better? While I am at it, am I running the risk of confusion between this new anaconda installation and the initial one?

Which versions of fbs, PySide2, shiboken2 and python do you use to distribute Qt for Python project?

I've tried many different things and for now I'm not sure. Maybe there are some compability errors. The fbs tutorial says that it works with 3.6 v of python and can work with errors on 3.7. But when I'm using 3.6 v of python, import of PySide2 fails. Tried 5.12.0, 5.12.5, 5.13.2 versions of PySide2 with the same of shiboken2. And all i've got was the same:
File "C:\Users\test\fbsenv\program_folder\lib\site-packages\shiboken2\__init__.py", line 27, in <module>
from .shiboken2 import *
ImportError: DLL load failed: The specified procedure could not be found.
No matter in venv or not, on different systems with Windows 7(x64). Using 3.7 v of python it works, but I can't freeze my project. Any project, even new empty one, it fails(text of it in the snippet used as spoiler)
(fbsenv) F:\Programming>fbs freeze
Traceback (most recent call last):
File "F:\Programs\Python\Python37-32\lib\runpy.py", line 193, in _run_module_a
s_main
"__main__", mod_spec)
File "F:\Programs\Python\Python37-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "F:\Programming\fbsenv\Scripts\pyinstaller.exe\__main__.py", line 9, in <
module>
File "f:\programming\fbsenv\lib\site-packages\PyInstaller\__main__.py", line 1
11, in run
run_build(pyi_config, spec_file, **vars(args))
File "f:\programming\fbsenv\lib\site-packages\PyInstaller\__main__.py", line 6
3, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "f:\programming\fbsenv\lib\site-packages\PyInstaller\building\build_main.
py", line 838, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'
))
File "f:\programming\fbsenv\lib\site-packages\PyInstaller\building\build_main.
py", line 784, in build
exec(text, spec_namespace)
File "<string>", line 29, in <module>
File "f:\programming\fbsenv\lib\site-packages\PyInstaller\building\api.py", li
ne 424, in __init__
strip_binaries=self.strip, upx_binaries=self.upx,
File "f:\programming\fbsenv\lib\site-packages\PyInstaller\building\api.py", li
ne 196, in __init__
self.__postinit__()
File "f:\programming\fbsenv\lib\site-packages\PyInstaller\building\datastruct.
py", line 158, in __postinit__
self.assemble()
File "f:\programming\fbsenv\lib\site-packages\PyInstaller\building\api.py", li
ne 273, in assemble
pylib_name = os.path.basename(bindepend.get_python_library_path())
File "F:\Programs\Python\Python37-32\lib\ntpath.py", line 214, in basename
return split(p)[1]
File "F:\Programs\Python\Python37-32\lib\ntpath.py", line 183, in split
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Traceback (most recent call last):
File "F:\Programming\fbsenv\Scripts\fbs-script.py", line 11, in <module>
load_entry_point('fbs==0.8.4', 'console_scripts', 'fbs')()
File "f:\programming\fbsenv\lib\site-packages\fbs\__main__.py", line 17, in _m
ain
fbs.cmdline.main()
File "f:\programming\fbsenv\lib\site-packages\fbs\cmdline.py", line 32, in mai
n
fn(*args)
File "f:\programming\fbsenv\lib\site-packages\fbs\builtin_commands\__init__.py
", line 120, in freeze
freeze_windows(debug=debug)
File "f:\programming\fbsenv\lib\site-packages\fbs\freeze\windows.py", line 18,
in freeze_windows
run_pyinstaller(args, debug)
File "f:\programming\fbsenv\lib\site-packages\fbs\freeze\__init__.py", line 47
, in run_pyinstaller
run(args, check=True)
File "F:\Programs\Python\Python37-32\lib\subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['pyinstaller', '--name', 'Namer', '--no
upx', '--log-level', 'ERROR', '--noconfirm', '--windowed', '--icon', 'F:\\Progra
mming\\src\\main\\icons\\Icon.ico', '--distpath', 'F:\\Programming\\target', '--
specpath', 'F:\\Programming\\target\\PyInstaller', '--workpath', 'F:\\Programmin
g\\target\\PyInstaller', '--additional-hooks-dir', 'f:\\programming\\fbsenv\\lib
\\site-packages\\fbs\\freeze\\hooks', '--runtime-hook', 'F:\\Programming\\target
\\PyInstaller\\fbs_pyinstaller_hook.py', 'F:\\Programming\\src\\main\\python\\ma
in.py']' returned non-zero exit status 1.
in
"F:\Programs\Python\Python37-32\lib\subprocess.py", line 487 there is
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired:
process.kill()
stdout, stderr = process.communicate()
raise TimeoutExpired(process.args, timeout, output=stdout,
stderr=stderr)
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
return CompletedProcess(process.args, retcode, stdout, stderr)
The second raise is called in this block, I don't know why.
So maybe I'm using wrong versions of something? Why shiboken2 not working on 3.6? Many pople said, thai fbs'll work with PySide(it runs, yet don't freeze), but maybe I should use PyQt?

Categories