cannot enable nbextensions in Jupyter Notebook with new Conda Environment on IBM DSX - jupyter-notebook

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.

Related

OperationalError: attempt to write a readonly DB on Vercel via Github (the DB and its folder are full-access on my local comp)

I am trying to deploy a simple Flask app with a SQLite database. It works fine when running locally. I deploy it on Vercel via Github. It works until it needs to write to the db. Then there is
OperationalError: attempt to write a readonly database
Both the DB and the folder ‘instance’ that contains it are Full-access on my local system, I can see it with
attrib ~/instance
in the command line (I am working with Windows 10). Is there a way to check and change the access mode of a file or a folder right on the Github repo?
Here are the logs regarding this error:
[ERROR] 2023-01-12T17:19:33.931Z 63bacb5b-ec13-4247-b784-9aaba99376a0
Exception on /register [POST]Traceback (most recent call last):
File "/var/task/sqlalchemy/engine/base.py", line 1900, in _execute_context self.dialect.do_execute
( File "/var/task/sqlalchemy/engine/default.py", line 736, in do_execute cursor.execute(statement, parameters)
sqlite3.OperationalError: attempt to write a readonly database
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/var/task/flask/app.py", line 2525, in wsgi_app response = self.full_dispatch_request() File "/var/task/flask/app.py", line 1822, in full_dispatch_request rv = self.handle_user_exception(e) File "/var/task/flask/app.py", line 1820, in full_dispatch_request rv = self.dispatch_request() File "/var/task/flask/app.py", line 1796, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) File "./app.py", line 136, in register db.session.commit()
File "<string>", line 2, in commit File "/var/task/sqlalchemy/orm/session.py", line 1451, in commit self._transaction.commit(_to_root=self.future) File "/var/task/sqlalchemy/orm/session.py", line 829, in commit self._prepare_impl() File "/var/task/sqlalchemy/orm/session.py", line 808, in _prepare_impl self.session.flush() File "/var/task/sqlalchemy/orm/session.py", line 3444, in flush self._flush(objects) File "/var/task/sqlalchemy/orm/session.py", line 3584, in _flush transaction.rollback(_capture_exception=True) File "/var/task/sqlalchemy/util/langhelpers.py", line 70, in __exit__ compat.raise_( File "/var/task/sqlalchemy/util/compat.py", line 211, in raise_ raise exception File "/var/task/sqlalchemy/orm/session.py", line 3544, in _flush flush_context.execute() File "/var/task/sqlalchemy/orm/unitofwork.py", line 456, in execute rec.execute(self) File "/var/task/sqlalchemy/orm/unitofwork.py", line 630, in execute util.preloaded.orm_persistence.save_obj( File "/var/task/sqlalchemy/orm/persistence.py", line 245, in save_obj _emit_insert_statements( File "/var/task/sqlalchemy/orm/persistence.py", line 1238, in _emit_insert_statements result = connection._execute_20( File "/var/task/sqlalchemy/engine/base.py", line 1705, in _execute_20 return meth(self, args_10style, kwargs_10style, execution_options) File "/var/task/sqlalchemy/sql/elements.py", line 334, in _execute_on_connection return connection._execute_clauseelement( File "/var/task/sqlalchemy/engine/base.py", line 1572, in _execute_clauseelement ret = self._execute_context( File "/var/task/sqlalchemy/engine/base.py", line 1943, in _execute_context self._handle_dbapi_exception( File "/var/task/sqlalchemy/engine/base.py", line 2124, in _handle_dbapi_exception util.raise_( File "/var/task/sqlalchemy/util/compat.py", line 211, in raise_ raise exception File "/var/task/sqlalchemy/engine/base.py", line 1900, in _execute_context self.dialect.do_execute( File "/var/task/sqlalchemy/engine/default.py", line 736, in do_execute cursor.execute(statement, parameters)sqlalchemy.exc.
OperationalError: (sqlite3.OperationalError) attempt to write a readonly database
I double-checked the access mode of the DB in my local system both as User and as Admin
It turns out that Vercel does not support SQLite. It is clearly written in their guides:
SQLite needs a local file system on the server to store the data
permanently when write requests are made. In a serverless environment,
this central single permanent storage is not available because storage
is ephemeral with serverless functions.
So it's not the problem of a Read-only mode, but rather the issue with SQL databases on Vercel.

AIRFLOW - "Oops Something bad has happened"

Everything was working just fine with my airflow fresh install, until I got this "Oops something bad has happened" message again. Had it previously when editing the connections.
Traceback (most recent call last):
File "/home/mica/.local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/mica/.local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/mica/.local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/mica/.local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/mica/.local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/mica/.local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/mica/.local/lib/python3.8/site-packages/airflow/www/auth.py", line 51, in decorated
return func(*args, **kwargs)
File "/home/mica/.local/lib/python3.8/site-packages/airflow/www/views.py", line 718, in index
paging=wwwutils.generate_pages(
File "/home/mica/.local/lib/python3.8/site-packages/airflow/www/utils.py", line 107, in generate_pages
first_node = Markup(
File "/home/mica/.local/lib/python3.8/site-packages/jinja2/utils.py", line 838, in __new__
warnings.warn(
File "/usr/lib/python3.8/warnings.py", line 109, in _showwarnmsg
sw(msg.message, msg.category, msg.filename, msg.lineno,
File "/home/mica/.local/lib/python3.8/site-packages/airflow/settings.py", line 117, in custom_show_warning
write_console.print(msg, soft_wrap=True)
File "/home/mica/.local/lib/python3.8/site-packages/rich/console.py", line 1642, in print
self._buffer.extend(new_segments)
File "/home/mica/.local/lib/python3.8/site-packages/rich/console.py", line 842, in __exit__
self._exit_buffer()
File "/home/mica/.local/lib/python3.8/site-packages/rich/console.py", line 800, in _exit_buffer
self._check_buffer()
File "/home/mica/.local/lib/python3.8/site-packages/rich/console.py", line 1934, in _check_buffer
self.file.write(text)
OSError: [Errno 5] Input/output error
The problem happened when I was launching airflow from the home. If you navigate to where the application is and then start the webserver, it worked for me.

Gunicorn error with running python eve server

I'm running an API written in python and deployed in Eve server. Further, I'm trying to run with gunicorn(production). The command I have run is gunicorn wsgi:app --preload -w 4 -b 0.0.0.0:7000 and it works as expected. Further, when we run this command we have to hit Ctrl+s for the workers to start running the same code. A question has already been asked with workers waiting indefinitely to start running using the preload option. However, I wanted to remove the preload option. So, when I run gunicorn wsgi:app -w 4 -b 0.0.0.0:7000, I get an error.
Use a production WSGI server instead.
* Debug mode: off
* Serving Flask app "eve" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
[2020-07-14 14:26:40 +0530] [23780] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/workers/base.py", line 119, in init_process
self.load_wsgi()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
self.wsgi = self.app.wsgi()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
return self.load_wsgiapp()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
return util.import_app(self.app_uri)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/util.py", line 358, in import_app
mod = importlib.import_module(module)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/root/Improved_ec/v2/improved_easy_credit/wsgi.py", line 4, in <module>
app.run(host='0.0.0.0')
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/eve/flaskapp.py", line 222, in run
super(Eve, self).run(host, port, debug, **options)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/flask/app.py", line 990, in run
run_simple(host, port, self, **options)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py", line 1010, in run_simple
inner()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py", line 963, in inner
fd=fd,
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py", line 806, in make_server
host, port, app, request_handler, passthrough_errors, ssl_context, fd=fd
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py", line 699, in __init__
HTTPServer.__init__(self, server_address, handler)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/socketserver.py", line 452, in __init__
self.server_bind()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/http/server.py", line 137, in server_bind
socketserver.TCPServer.server_bind(self)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/socketserver.py", line 466, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
[2020-07-14 14:26:40 +0530] [23797] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/workers/base.py", line 119, in init_process
self.load_wsgi()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
self.wsgi = self.app.wsgi()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
return self.load_wsgiapp()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
return util.import_app(self.app_uri)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/util.py", line 358, in import_app
mod = importlib.import_module(module)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/root/Improved_ec/v2/improved_easy_credit/wsgi.py", line 4, in <module>
app.run(host='0.0.0.0')
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/eve/flaskapp.py", line 222, in run
super(Eve, self).run(host, port, debug, **options)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/flask/app.py", line 990, in run
run_simple(host, port, self, **options)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py", line 1010, in run_simple
inner()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py", line 963, in inner
fd=fd,
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py", line 806, in make_server
host, port, app, request_handler, passthrough_errors, ssl_context, fd=fd
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py", line 699, in __init__
HTTPServer.__init__(self, server_address, handler)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/socketserver.py", line 452, in __init__
self.server_bind()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/http/server.py", line 137, in server_bind
socketserver.TCPServer.server_bind(self)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/socketserver.py", line 466, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
[2020-07-14 14:26:40 +0530] [23780] [INFO] Worker exiting (pid: 23780)
[2020-07-14 14:26:40 +0530] [23797] [INFO] Worker exiting (pid: 23797)
[2020-07-14 14:26:40 +0530] [23796] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/workers/base.py", line 119, in init_process
self.load_wsgi()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
self.wsgi = self.app.wsgi()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
return self.load_wsgiapp()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
return util.import_app(self.app_uri)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/util.py", line 358, in import_app
mod = importlib.import_module(module)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/root/Improved_ec/v2/improved_easy_credit/wsgi.py", line 4, in <module>
app.run(host='0.0.0.0')
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/eve/flaskapp.py", line 222, in run
super(Eve, self).run(host, port, debug, **options)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/flask/app.py", line 990, in run
run_simple(host, port, self, **options)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py", line 1010, in run_simple
inner()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py", line 963, in inner
fd=fd,
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py", line 806, in make_server
host, port, app, request_handler, passthrough_errors, ssl_context, fd=fd
File "/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py", line 699, in __init__
HTTPServer.__init__(self, server_address, handler)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/socketserver.py", line 452, in __init__
self.server_bind()
File "/root/anaconda3/envs/imp_ec/lib/python3.7/http/server.py", line 137, in server_bind
socketserver.TCPServer.server_bind(self)
File "/root/anaconda3/envs/imp_ec/lib/python3.7/socketserver.py", line 466, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
[2020-07-14 14:26:40 +0530] [23796] [INFO] Worker exiting (pid: 23796)
[2020-07-14 14:27:10 +0530] [23776] [INFO] Shutting down: Master
[2020-07-14 14:27:10 +0530] [23776] [INFO] Reason: Worker failed to boot.
Moreover, when I remove the `-w', the server launches as expected with a single worker.
So, how do I fix this error with workers?

Pyinstaller isn't working

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

Bika LIMS : ImportError No module named parse

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.

Resources