Python Pywallet give error in .exe made by pyinstaller - python

I'm trying to make my python bitcoin wallet go to exe by pyinstaller but when i run this and try to create new wallet i get this error:
Traceback (most recent call last):
File "btcwallet.py", line 111, in <module>
File "btcwallet.py", line 80, in menu
File "btcwallet.py", line 47, in save_wallet
File "btcwallet.py", line 40, in generate_wallet
File "pywallet\wallet.py", line 13, in generate_mnemonic
File "pywallet\utils\ethereum.py", line 1321, in master_key_from_entropy
File "mnemonic\mnemonic.py", line 47, in __init__
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\mistr\\AppData\\Local\\Temp\\_MEI35242\\mnemonic\\wordlist/english.txt'
[2548] Failed to execute script 'btcwallet' due to unhandled exception!
Solution:
I had to use this command: pyinstaller --onefile --collect-all mnemonic --hidden-import mnemonic btcwallet.py

Related

Python Script Runs in Anaconda but there is a OSError

I'm trying to run a python script. when I try to then run the same program from Windows Powershell, I always get this error:
File "D:\software\python3\lib\site-packages\scipy\stats\__init__.py", line 468, in <module>
from ._rvs_sampling import rvs_ratio_uniforms, NumericalInverseHermite # noqa
File "D:\software\python3\lib\site-packages\scipy\stats\_rvs_sampling.py", line 3, in <module>
from ._unuran import unuran_wrapper
File "unuran_wrapper.pyx", line 221, in init scipy.stats._unuran.unuran_wrapper
File "unuran_wrapper.pyx", line 200, in scipy.stats._unuran.unuran_wrapper._setup_unuran
File "messagestream.pyx", line 36, in scipy._lib.messagestream.MessageStream.__cinit__
OSError: Failed to open file b'C:\\Users\\\xe7\xbd\x97\xe5\x8f\xaf\xe8\xb1\xaa\\AppData\\Local\\Temp\\scipy-qm7k_i7q'
This is my shell commond:
python detect.py --source data/images/bus.jpg --weights pretrained/yolov5s.pt

Windows 10 Error: FileNotFoundError: The System cannot find the file specified subprocess while executing an .exe

I get an error every time i want to start a exe build python. I cant change the code because its an exe.
The full error:
Traceback (most recent call last):
File "boltchecker.py", line 6897, in <module>
File "boltchecker.py", line 4819, in __init__
File "subprocess.py", line 411, in check_output
File "subprocess.py", line 489, in run
File "subprocess.py", line 854, in __init__
File "subprocess.py", line 1307, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified
[18104] Failed to execute script boltchecker
I hope someone can help me with this :)

EXE file created from py not running

I have a file in Python 3.4 which I have converted in exe using cx_freeze. When I double click the file I get nothing, seems its opening, and closing on its own however when I go to the command prompt n run it I get the below error:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
exec(code, m.__dict__)
File "Mytime.py", line 10, in <module>
File "C:\Python34\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 43, in _init_
self.profile = FirefoxProfile()
File "C:\Python34\lib\site-packages\selenium\webdriver\firefox\firefox_profile.py", line 64, in _init_
WEBDRIVER_PREFERENCES)) as default_prefs:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Python34\\build\\exe.win32-3.4\\library.zip\\selenium\\webdriver\\firefox\\webdriver_prefs.json'
What's missing?

How to distribute my Python script to other computers without python?

I have this Python script which I want to run on other windows computers without python.So i have tried py2exe and pyinstaller but none of these work as when I try copy the .exe file to an other system and run it but I get an ERROR:
Traceback (most recent call last):
File "client.pyw", line 4, in <module>
File "zipextimporter.pyo", line 82, in load_module
File "gtk\__init__.pyo", line 30, in <module>
File "zipextimporter.pyo", line 82, in load_module
File "gobject\__init__.pyo", line 26, in <module>
File "zipextimporter.pyo", line 82, in load_module
File "glib\__init__.pyo", line 22, in <module>
File "zipextimporter.pyo", line 98, in load_module
ImportError: MemoryLoadLibrary failed loading glib\_glib.pyd
You can try cx_Freeze or include Python installing to program installer (may be a batch script):
msiexec /i /quiet /passive python.msi
When needing to make an executable out of a Python script, I found py2exe (or its GUI brother GUI2Exe to be the most useful tools. There are a few other options.

virtualenvwrapper issues on cygwin using python3.4 (installed using standalone installer)

I'm having issues with virtualenv wrapper, I receive the below error when I run:
source /cygdrive/c/Python34/Scripts/virtualenvwrapper.sh
I've run
which python <- shows correct path
which virtualenvwrapper.sh <- shows correct path
which virtualenv <- shows correct path
Error:
>$ source /cygdrive/c/Python34/Scripts/virtualenvwrapper.sh
stevedore.extension error calling 'project': [Errno 2] No such file or directory : 'C:\\home\\kolafsson\\.virtualenvs\\premkproject'
stevedore.extension [Errno 2] No such file or directory: 'C:\\home\\kolafsson\\. virtualenvs\\premkproject'
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\stevedore-0.15-py3.4.egg\stevedore\extensi on.py", line 248, in _invoke_one_plugin
response_callback(func(e, *args, **kwds))
File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv wrapper\hook_loader.py", line 185, in invoke
File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv wrapper\project.py", line 30, in initialize
comment)
File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv wrapper\user_scripts.py", line 124, in make_hook
f = open(filename, 'w')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\home\\kolafsson\\.v irtualenvs\\premkproject'
stevedore.extension error calling 'user_scripts': [Errno 2] No such file or dire ctory: 'C:\\home\\kolafsson\\.virtualenvs\\initialize'
stevedore.extension [Errno 2] No such file or directory: 'C:\\home\\kolafsson\\. virtualenvs\\initialize'
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\stevedore-0.15-py3.4.egg\stevedore\extensi on.py", line 248, in _invoke_one_plugin
response_callback(func(e, *args, **kwds))
File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv wrapper\hook_loader.py", line 185, in invoke
File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv wrapper\user_scripts.py", line 141, in initialize
make_hook(get_path('$VIRTUALENVWRAPPER_HOOK_DIR', filename), comment)
File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv wrapper\user_scripts.py", line 124, in make_hook
f = open(filename, 'w')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\home\\kolafsson\\.v irtualenvs\\initialize'
Traceback (most recent call last):
File "C:\Python34\lib\runpy.py", line 171, in _run_module_as_main
"__main__", mod_spec)
File "C:\Python34\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv wrapper\hook_loader.py", line 217, in <module>
File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv wrapper\hook_loader.py", line 137, in main
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/virtualenvwrapper- initialize-hook-Kxjb02CrwN'
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenv has been installed for
VIRTUALENVWRAPPER_PYTHON=/cygdrive/c/Python34/python and that PATH is
set properly.
Does anyone know what is causing this error and how I could fix it?
Problems I had were due to the permissions on the virtualenv directory not being correct. The had root when I needed the local user.
which here might be 'C:\\home\\kolafsson\\.v....

Categories