I created a test.py file, which holds the locust as a library example from the docs.
I then ran the command pyinstaller test.py \
The logs I received started fine:
206 INFO: PyInstaller: 4.9
206 INFO: Python: 3.10.5
212 INFO: Platform: Windows-10-10.0.19044-SP0
213 INFO: wrote C:\Users\Roey2\test.spec
215 INFO: UPX is not available.
219 INFO: Extending PYTHONPATH with paths
['C:\\Projects\\Test']
431 INFO: checking Analysis
431 INFO: Building Analysis because Analysis-00.toc is non existent
431 INFO: Initializing module dependency graph...
433 INFO: Caching module graph hooks...
441 INFO: Analyzing base_library.zip ...
3015 INFO: Processing pre-find module path hook distutils from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
3016 INFO: distutils: retargeting to non-venv dir 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\lib'
3732 INFO: Caching module dependency graph...
3839 INFO: running Analysis Analysis-00.toc
3850 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by C:\Users\Roey2\AppData\Local\Programs\Python\Python310\python.exe
3969 INFO: Analyzing C:\Projects\Test\test.py
4486 INFO: Processing pre-find module path hook site from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-site.py'.
4486 INFO: site: retargeting to fake-dir 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\fake-modules'
8619 INFO: Processing pre-safe import module hook urllib3.packages.six.moves from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-urllib3.packages.six.moves.py'.
10258 INFO: Processing pre-safe import module hook six.moves from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-six.moves.py'.
11821 INFO: Processing module hooks...
11821 INFO: Loading module hook 'hook-certifi.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
11825 INFO: Loading module hook 'hook-cryptography.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
12007 INFO: Loading module hook 'hook-jinja2.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
12007 INFO: Loading module hook 'hook-pycparser.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
12008 INFO: Loading module hook 'hook-zmq.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
12105 INFO: Loading module hook 'hook-difflib.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks'...
12108 INFO: Loading module hook 'hook-distutils.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks'...
12108 INFO: Loading module hook 'hook-distutils.util.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks'...
12110 INFO: Loading module hook 'hook-encodings.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks'...
12170 INFO: Loading module hook 'hook-gevent.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks'...
Then something weird happened, it started running the test. Seems the freeze failed when it tried to load gevent. When I tried using auto-py-to-exe, and added a hidden import for gevent, same error occurred.
Type Name # reqs # fails | Avg Min Max Med | req/s failures/s
--------|----------------------------------------------------------------------------|-------|-------------|-------|-------|-------|-------|--------|-----------
--------|----------------------------------------------------------------------------|-------|-------------|-------|-------|-------|-------|--------|-----------
Aggregated 0 0(0.00%) | 0 0 0 0 | 0.00 0.00
[2022-09-29 13:19:29,824] LAPTOP-93J7NJGB/INFO/locust.runners: Ramping to 1 users at a rate of 10.00 per second
[2022-09-29 13:19:29,825] LAPTOP-93J7NJGB/INFO/locust.runners: All users spawned: {"User": 1} (1 total users)
Type Name # reqs # fails | Avg Min Max Med | req/s failures/s
--------|----------------------------------------------------------------------------|-------|-------------|-------|-------|-------|-------|--------|-----------
GET /non-existing-path 1 1(100.00%) | 794 794 794 794 | 0.00 0.00
--------|----------------------------------------------------------------------------|-------|-------------|-------|-------|-------|-------|--------|-----------
Aggregated 1 1(100.00%) | 794 794 794 794 | 0.00 0.00
When 60 seconds passed, it timed out.
Traceback (most recent call last):
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\__main__.py", line 124, in run
run_build(pyi_config, spec_file, **vars(args))
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\__main__.py", line 58, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\building\build_main.py", line 793, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\building\build_main.py", line 725, in build
exec(code, spec_namespace)
File "C:\Users\Roey2\test.spec", line 7, in <module>
a = Analysis(['C:\\Projects\\Test\\test.py'],
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\building\build_main.py", line 277, in __init__
self.__postinit__()
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\building\datastruct.py", line 155, in __postinit__
self.assemble()
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\building\build_main.py", line 445, in assemble
self.graph.process_post_graph_hooks(self)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\depend\analysis.py", line 326, in process_post_graph_hooks
module_hook.post_graph(analysis)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\depend\imphook.py", line 398, in post_graph
self._load_hook_module()
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\depend\imphook.py", line 361, in _load_hook_module
self._hook_module = importlib_load_source(self.hook_module_name, self.hook_filename)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\compat.py", line 606, in importlib_load_source
return mod_loader.load_module()
File "<frozen importlib._bootstrap_external>", line 548, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 1063, in load_module
File "<frozen importlib._bootstrap_external>", line 888, in load_module
File "<frozen importlib._bootstrap>", line 290, in _load_module_shim
File "<frozen importlib._bootstrap>", line 719, in _load
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\hooks\hook-gevent.py", line 16, in <module>
datas, binaries, hiddenimports = collect_all(
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 1081, in collect_all
hiddenimports = collect_submodules(package_name, filter=filter_submodules)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 564, in collect_submodules
names = exec_statement(
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 91, in exec_statement
return __exec_statement(statement, capture_stdout=True)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 75, in __exec_statement
return __exec_python_cmd(cmd, capture_stdout=capture_stdout)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 66, in __exec_python_cmd
txt = compat.exec_python(*cmd, env=pp_env)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\compat.py", line 546, in exec_python
return exec_command(*cmdargs, **kwargs)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\compat.py", line 332, in exec_command
out = proc.communicate(timeout=60)[0]
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1152, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1528, in _communicate
raise TimeoutExpired(self.args, orig_timeout)
subprocess.TimeoutExpired: Command '('C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\python.exe', '-c', '\nimport sys\nimport pkgutil\nimport traceback\n\n# ``pkgutil.walk_packages`` does not walk subpackages of zipped files per https://bugs.python.org/issue14209.\n# This is a workaround.\ndef walk_packages(path=None, prefix=\'\', onerror=None):\n def seen(p, m={}):\n if p in m:\n return True\n m[p] = True\n\n for importer, name, ispkg in pkgutil.iter_modules(path, prefix):\n if not name.startswith(prefix):\n name = prefix + name\n yield importer, name, ispkg\n\n if ispkg:\n try:\n __import__(name)\n except ImportError:\n if onerror is not None:\n onerror(name)\n except Exception:\n if onerror is not None:\n onerror(name)\n else:\n traceback.print_exc(file=sys.stderr)\n print("collect_submodules: failed to import %r!" % name, file=sys.stderr)\n else:\n path = getattr(sys.modules[name], \'__path__\', None) or []\n\n # don\'t traverse path items we\'ve seen before\n path = [p for p in path if not seen(p)]\n\n # Use Py2 code here. It still works in Py3.\n for item in walk_packages(path, name+\'.\', onerror):\n yield item\n # This is the original Py3 code.\n #yield from walk_packages(path, name+\'.\', onerror)\n\nfor module_loader, name, ispkg in walk_packages([\'C:\\\\Users\\\\Roey2\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python310\\\\Lib\\\\site-packages\\\\gevent\'], \'gevent.\'):\n print(\'\\n$_pyi:\' + name + \'*\')\n')' timed out after 60 seconds
I have no idea where to even start. Is it PyInstaller not freezing correctly? Is it Gevent not cooporating? Is it locust that can't handle it? Is it my specific env? I saw the other question about PyInstaller, so maybe it's my env, but it was asked 2 years, and 6 python versions ago.
Any help appreciated.
Related
I have installed the spacy 3.1.2 and trying to install en_core_web_sm on jupyter notebook in Jupyterlab by using
!python3 -m spacy download en_core_web_sm
but it is showing the following error
2021-09-01 07:00:12.028366: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory
2021-09-01 07:00:12.028469: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory
2021-09-01 07:00:12.028486: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 488, in wrap_socket
cnx.do_handshake()
File "/opt/conda/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1934, in do_handshake
self._raise_ssl_error(self._ssl, result)
File "/opt/conda/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1671, in _raise_ssl_error
_raise_current_error()
File "/opt/conda/lib/python3.7/site-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py", line 667, in urlopen
self._prepare_proxy(conn)
File "/opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py", line 932, in _prepare_proxy
conn.connect()
File "/opt/conda/lib/python3.7/site-packages/urllib3/connection.py", line 371, in connect
ssl_context=context,
File "/opt/conda/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 384, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/opt/conda/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 494, in wrap_socket
raise ssl.SSLError("bad handshake: %r" % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])",)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py", line 727, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/opt/conda/lib/python3.7/site-packages/urllib3/util/retry.py", line 439, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /explosion/spacy-models/master/compatibility.json (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/opt/conda/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/jovyan/.local/lib/python3.7/site-packages/spacy/__main__.py", line 4, in <module>
setup_cli()
File "/home/jovyan/.local/lib/python3.7/site-packages/spacy/cli/_util.py", line 69, in setup_cli
command(prog_name=COMMAND)
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/jovyan/.local/lib/python3.7/site-packages/typer/main.py", line 497, in wrapper
return callback(**use_params) # type: ignore
File "/home/jovyan/.local/lib/python3.7/site-packages/spacy/cli/download.py", line 35, in download_cli
download(model, direct, sdist, *ctx.args)
File "/home/jovyan/.local/lib/python3.7/site-packages/spacy/cli/download.py", line 67, in download
compatibility = get_compatibility()
File "/home/jovyan/.local/lib/python3.7/site-packages/spacy/cli/download.py", line 78, in get_compatibility
r = requests.get(about.__compatibility__)
File "/opt/conda/lib/python3.7/site-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/opt/conda/lib/python3.7/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /explosion/spacy-models/master/compatibility.json (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
Due to this, I can't use
import spacy
nlp = spacy.load('en_core_web_sm')
Because it is showing error as:
OSError: [E050] Can't find model 'en_core_web_sm'. It doesn't seem to be a Python package or a valid path to a data directory.
I have searched various post and articles related to it but nothing is working for me.
Can anyone tell me how to resolve this error ? It would be very helpful for me.
Good morning,
i am using tensorflow lite and i also wanted to use telepot.
I also installed the Coral USB accelerator, but I don't think it depends on him, also because it is independent of whether or not to add --edgetpu to the end of the program start command.
It works only if the transfer of messages or images I place it before this instruction:
from tensorflow.lite.python.interpreter import Interpreter
it's how telepot is incompatible with tflite.
Obviously everything works without the telepot instruction
What can I do?
I'm using a raspberry pi 4 with s.o. Debian burst, Python 3.7 and Opencv 4.1
This is the error that gives me:
Traceback (most recent call last):
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 485, in wrap_socket
cnx.do_handshake()
File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1915, in do_handshake
self._raise_ssl_error(self._ssl, result)
File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1647, in _raise_ssl_error
_raise_current_error()
File "/usr/lib/python3/dist-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
conn.connect()
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connection.py", line 394, in connect
ssl_context=context,
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 370, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 491, in wrap_socket
raise ssl.SSLError("bad handshake: %r" % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])",)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "TFLite_detection_webcam_Prova1.py", line 137, in <module>
spedisci()
File "TFLite_detection_webcam_Prova1.py", line 33, in spedisci
bot.sendPhoto(256868258, foto)
File "/usr/local/lib/python3.7/dist-packages/telepot/__init__.py", line 539, in sendPhoto
return self._api_request_with_file('sendPhoto', _rectify(p), 'photo', photo)
File "/usr/local/lib/python3.7/dist-packages/telepot/__init__.py", line 499, in _api_request_with_file
return self._api_request(method, _rectify(params), files, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/telepot/__init__.py", line 491, in _api_request
return api.request((self._token, method, params, files), **kwargs)
File "/usr/local/lib/python3.7/dist-packages/telepot/api.py", line 154, in request
r = fn(*args, **kwargs) # `fn` must be thread-safe
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/request.py", line 171, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/poolmanager.py", line 330, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 760, in urlopen
**response_kw
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 760, in urlopen
**response_kw
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 760, in urlopen
**response_kw
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool
(host='api.telegram.org', port=443): Max retries exceeded with url: /bot926377239:AAEl0gqMWzG0dMidkGNqcGr2wkeTLbgZn3g/sendPhoto (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
Trying to install this package:-
https://github.com/lspvic/jupyter_tensorboard
Python 2.7
I cannot enable nbextensions in Jupyter Notebook with new Conda Environment
Here is the stacktrace
Enabling notebook extension jupyter_tensorboard/tree...
Traceback (most recent call last):
File "/opt/conda/envs/DSX-Python27/bin/jupyter-nbextension", line 11, in <module>
sys.exit(main())
File "/opt/conda/envs/DSX-Python27/lib/python2.7/site-packages/jupyter_core/application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/opt/conda/envs/DSX-Python27/lib/python2.7/site-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/opt/conda/envs/DSX-Python27/lib/python2.7/site-packages/notebook/nbextensions.py", line 988, in start
super(NBExtensionApp, self).start()
File "/opt/conda/envs/DSX-Python27/lib/python2.7/site-packages/jupyter_core/application.py", line 256, in start
self.subapp.start()
File "/opt/conda/envs/DSX-Python27/lib/python2.7/site-packages/notebook/nbextensions.py", line 898, in start
self.toggle_nbextension(self.extra_args[0])
File "/opt/conda/envs/DSX-Python27/lib/python2.7/site-packages/notebook/nbextensions.py", line 888, in toggle_nbextension
logger=self.log)
File "/opt/conda/envs/DSX-Python27/lib/python2.7/site-packages/notebook/nbextensions.py", line 413, in enable_nbextension
logger=logger)
File "/opt/conda/envs/DSX-Python27/lib/python2.7/site-packages/notebook/nbextensions.py", line 351, in _set_nbextension_state
cm.update(section, {"load_extensions": {require: state}})
File "/opt/conda/envs/DSX-Python27/lib/python2.7/site-packages/traitlets/config/manager.py", line 87, in update
self.set(section_name, data)
File "/opt/conda/envs/DSX-Python27/lib/python2.7/site-packages/traitlets/config/manager.py", line 71, in set
self.ensure_config_dir_exists()
File "/opt/conda/envs/DSX-Python27/lib/python2.7/site-packages/traitlets/config/manager.py", line 46, in ensure_config_dir_exists
os.makedirs(self.config_dir, 0o755)
File "/opt/conda/envs/DSX-Python27/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/opt/ibm/dsx/config/nbconfig'
Looks like permission error, Can it be install/enabled with user flag.
Whenever I try to run pyinstaller.py with my script it outputs a bunch of code and I have no idea what it means. All I'm trying to do is turn my python file into an executable but it isn't working. It looks like it's working until it says Traceback after 100 and then it shows a whole bunch of file locations.
C:\Users\Smith 1>python C:/py/pyinstaller.py C:/py/Calculator.py
84 INFO: PyInstaller: 3.2.1
84 INFO: Python: 3.6.0
84 INFO: Platform: Windows-10-10.0.14393-SP0
84 INFO: wrote C:\Users\Smith 1\Calculator.spec
84 INFO: UPX is not available.
100 INFO: Extending PYTHONPATH with paths
['C:\\py', 'C:\\Users\\Smith 1']
100 INFO: checking Analysis
100 INFO: Building Analysis because out00-Analysis.toc is non existent
100 INFO: Initializing module dependency graph...
100 INFO: Initializing module graph hooks...
100 INFO: Analyzing base_library.zip ...
Traceback (most recent call last):
File "C:/py/pyinstaller.py", line 15, in <module>
run()
File "C:\Users\Smith 1\AppData\Local\Programs\Python\Python36\lib\site-packages\PyInstaller\__main__.py", line 90, in run
run_build(pyi_config, spec_file, **vars(args))
File "C:\Users\Smith 1\AppData\Local\Programs\Python\Python36\lib\site-packages\PyInstaller\__main__.py", line 46, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "C:\Users\Smith 1\AppData\Local\Programs\Python\Python36\lib\site-packages\PyInstaller\building\build_main.py", line 788, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "C:\Users\Smith 1\AppData\Local\Programs\Python\Python36\lib\site-packages\PyInstaller\building\build_main.py", line 734, in build
exec(text, spec_namespace)
File "<string>", line 16, in <module>
File "C:\Users\Smith 1\AppData\Local\Programs\Python\Python36\lib\site-packages\PyInstaller\building\build_main.py", line 212, in __init__
self.__postinit__()
File "C:\Users\Smith 1\AppData\Local\Programs\Python\Python36\lib\site-packages\PyInstaller\building\datastruct.py", line 161, in __postinit__
self.assemble()
File "C:\Users\Smith 1\AppData\Local\Programs\Python\Python36\lib\site-packages\PyInstaller\building\build_main.py", line 317, in assemble
excludes=self.excludes, user_hook_dirs=self.hookspath)
File "C:\Users\Smith 1\AppData\Local\Programs\Python\Python36\lib\site-packages\PyInstaller\depend\analysis.py", line 560, in initialize_modgraph
graph.import_hook(m)
File "C:\Users\Smith 1\AppData\Local\Programs\Python\Python36\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1509, in import_hook
source_package, target_module_partname, level)
File "C:\Users\Smith 1\AppData\Local\Programs\Python\Python36\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1661, in _find_head_package
target_module_headname, target_package_name, source_package)
File "C:\Users\Smith 1\AppData\Local\Programs\Python\Python36\lib\site-packages\PyInstaller\depend\analysis.py", line 209, in _safe_import_module
module_basename, module_name, parent_package)
File "C:\Users\Smith 1\AppData\Local\Programs\Python\Python36\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2077, in _safe_import_module
module_name, file_handle, pathname, metadata)
File "C:\Users\Smith 1\AppData\Local\Programs\Python\Python36\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2167, in _load_module
self._scan_code(m, co, co_ast)
File "C:\Users\Smith 1\AppData\Local\Programs\Python\Python36\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2585, in _scan_code
module, module_code_object, is_scanning_imports=False)
File "C:\Users\Smith 1\AppData\Local\Programs\Python\Python36\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2831, in _scan_bytecode
global_attr_name = get_operation_arg_name()
File "C:\Users\Smith 1\AppData\Local\Programs\Python\Python36\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2731, in get_operation_arg_name
return module_code_object.co_names[co_names_index]
IndexError: tuple index out of range
I'm trying to install bika.lims
This is the error log when I run this command sudo -u plone_daemon bin/client1 fg
Zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/usr/local/Plone/zeocluster/parts/client1/etc/site.zcml", line 12.2-12.39
ZopeXMLConfigurationError: File "/usr/local/Plone/buildout-cache/eggs/Products.CMFPlone-4.3.9-py2.7.egg/Products/CMFPlone/meta.zcml", line 42.4-46.10
Full traceback
2016-12-14 09:00:11 INFO ZServer HTTP server started at Wed Dec 14 09:00:11 2016
Hostname: 0.0.0.0
Port: 8080
2016-12-14 09:00:18 INFO Products.PloneHotfix20160419 Applied publishing patch
2016-12-14 09:00:18 INFO Products.PloneHotfix20160419 Applied dexterity patch
2016-12-14 09:00:18 INFO Products.PloneHotfix20160419 Hotfix installed
2016-12-14 09:00:19 INFO ZEO.ClientStorage zeostorage ClientStorage (pid=4042) created RW/normal for storage: '1'
2016-12-14 09:00:19 INFO ZEO.cache created temporary cache file '<fdopen>'
2016-12-14 09:00:19 INFO ZEO.ClientStorage zeostorage Testing connection <ManagedClientConnection ('127.0.0.1', 8100)>
2016-12-14 09:00:19 INFO ZEO.zrpc.Connection(C) (127.0.0.1:8100) received handshake 'Z3101'
2016-12-14 09:00:19 INFO ZEO.ClientStorage zeostorage Server authentication protocol None
2016-12-14 09:00:19 INFO ZEO.ClientStorage zeostorage Connected to storage: ('localhost', 8100)
2016-12-14 09:00:19 INFO ZEO.ClientStorage zeostorage No verification necessary -- empty cache
2016-12-14 09:00:21 INFO ZEO.ClientStorage zeostorage Disconnected from storage: "('localhost', 8100)"
Traceback (most recent call last):
File "/usr/local/Plone/zeocluster/parts/client1/bin/interpreter", line 307, in <module>
exec(compile(__file__f.read(), __file__, "exec"))
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/run.py", line 76, in <module>
run()
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/run.py", line 22, in run
starter.prepare()
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/__init__.py", line 92, in prepare
self.startZope()
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/__init__.py", line 268, in startZope
Zope2.startup()
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/__init__.py", line 47, in startup
_startup()
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/App/startup.py", line 118, in startup
load_zcml()
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/App/startup.py", line 52, in load_zcml
load_site()
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/App/zcml.py", line 46, in load_site
_context = xmlconfig.file(site_zcml)
File "/usr/local/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 649, in file
include(context, name, package)
File "/usr/local/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
processxmlfile(f, context)
File "/usr/local/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
parser.parse(src)
File "/usr/local/Plone/Python-2.7/lib/python2.7/xml/sax/expatreader.py", line 110, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/Plone/Python-2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/local/Plone/Python-2.7/lib/python2.7/xml/sax/expatreader.py", line 213, in feed
self._parser.Parse(data, isFinal)
File "/usr/local/Plone/Python-2.7/lib/python2.7/xml/sax/expatreader.py", line 365, in end_element_ns
self._cont_handler.endElementNS(pair, None)
File "/usr/local/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
self.context.end()
File "/usr/local/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
self.stack.pop().finish()
File "/usr/local/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
actions = self.handler(context, **args)
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/OFS/metaconfigure.py", line 46, in loadProducts
xmlconfig.include(_context, zcml, package=product)
File "/usr/local/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
processxmlfile(f, context)
File "/usr/local/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
parser.parse(src)
File "/usr/local/Plone/Python-2.7/lib/python2.7/xml/sax/expatreader.py", line 110, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/Plone/Python-2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/local/Plone/Python-2.7/lib/python2.7/xml/sax/expatreader.py", line 213, in feed
self._parser.Parse(data, isFinal)
File "/usr/local/Plone/Python-2.7/lib/python2.7/xml/sax/expatreader.py", line 365, in end_element_ns
self._cont_handler.endElementNS(pair, None)
File "/usr/local/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
self.context.end()
File "/usr/local/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
self.stack.pop().finish()
File "/usr/local/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
actions = self.handler(context, **args)
File "/usr/local/Plone/buildout-cache/eggs/z3c.autoinclude-0.3.5-py2.7.egg/z3c/autoinclude/zcml.py", line 101, in includePluginsDirective
info = PluginFinder(dotted_name).includableInfo(zcml_to_look_for)
File "/usr/local/Plone/buildout-cache/eggs/z3c.autoinclude-0.3.5-py2.7.egg/z3c/autoinclude/plugin.py", line 18, in includableInfo
groups = zcml_to_include(plugin_dottedname, zcml_to_look_for)
File "/usr/local/Plone/buildout-cache/eggs/z3c.autoinclude-0.3.5-py2.7.egg/z3c/autoinclude/plugin.py", line 36, in zcml_to_include
filename = resource_filename(dotted_name, zcmlgroup)
File "/usr/local/Plone/buildout-cache/eggs/setuptools-20.1.1-py2.7.egg/pkg_resources/__init__.py", line 1149, in resource_filename
return get_provider(package_or_requirement).get_resource_filename(
File "/usr/local/Plone/buildout-cache/eggs/setuptools-20.1.1-py2.7.egg/pkg_resources/__init__.py", line 424, in get_provider
__import__(moduleOrReq)
File "/usr/local/Plone/buildout-cache/eggs/bika.lims-3.1.11-py2.7.egg/bika/lims/__init__.py", line 15, in <module>
from bika.lims.validators import *
File "/usr/local/Plone/buildout-cache/eggs/bika.lims-3.1.11-py2.7.egg/bika/lims/validators.py", line 4, in <module>
from bika.lims.utils import to_utf8
File "/usr/local/Plone/buildout-cache/eggs/bika.lims-3.1.11-py2.7.egg/bika/lims/utils/__init__.py", line 19, in <module>
from weasyprint import HTML, CSS
File "/usr/local/Plone/buildout-cache/eggs/WeasyPrint-0.19.2-py2.7.egg/weasyprint/__init__.py", line 304, in <module>
from .css import PARSER, preprocess_stylesheet
File "/usr/local/Plone/buildout-cache/eggs/WeasyPrint-0.19.2-py2.7.egg/weasyprint/css/__init__.py", line 31, in <module>
from .validation import preprocess_declarations
File "/usr/local/Plone/buildout-cache/eggs/WeasyPrint-0.19.2-py2.7.egg/weasyprint/css/validation.py", line 26, in <module>
from ..images import LinearGradient, RadialGradient
File "/usr/local/Plone/buildout-cache/eggs/WeasyPrint-0.19.2-py2.7.egg/weasyprint/images.py", line 22, in <module>
import cairosvg.parser
File "/usr/local/Plone/buildout-cache/eggs/CairoSVG-2.0.0-py2.7.egg/cairosvg/__init__.py", line 29, in <module>
from . import surface
File "/usr/local/Plone/buildout-cache/eggs/CairoSVG-2.0.0-py2.7.egg/cairosvg/surface.py", line 27, in <module>
from .defs import (
File "/usr/local/Plone/buildout-cache/eggs/CairoSVG-2.0.0-py2.7.egg/cairosvg/defs.py", line 24, in <module>
from .bounding_box import calculate_bounding_box, is_non_empty_bounding_box
File "/usr/local/Plone/buildout-cache/eggs/CairoSVG-2.0.0-py2.7.egg/cairosvg/bounding_box.py", line 27, in <module>
from .helpers import PATH_LETTERS, normalize, point, size
File "/usr/local/Plone/buildout-cache/eggs/CairoSVG-2.0.0-py2.7.egg/cairosvg/helpers.py", line 26, in <module>
from .url import parse_url
File "/usr/local/Plone/buildout-cache/eggs/CairoSVG-2.0.0-py2.7.egg/cairosvg/url.py", line 24, in <module>
from urllib.parse import urljoin, urlparse
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/usr/local/Plone/zeocluster/parts/client1/etc/site.zcml", line 12.2-12.39
ZopeXMLConfigurationError: File "/usr/local/Plone/buildout-cache/eggs/Products.CMFPlone-4.3.9-py2.7.egg/Products/CMFPlone/meta.zcml", line 42.4-46.10
ImportError: No module named parse
Any ideas?
The dependency "CairoSVG"-2.0.0, you are using is intended to be used with Python-3, that's probably why the installation-instructions say to use a lower version compatible with Python-2. The buildout-config of the bika.lims-repo pins CairoSVG to version 1.0.20:
https://github.com/bikalabs/bika.lims/blob/master/buildout.cfg
Adjust your buildout-config accordingly, run buildout and restart the server/clients.