I was installing Openstack via devstack in ubuntu 16.04, it's running well for 20min until the error posted. I am not sure it's regarding compression or memory, it's hard to google the answer according to the error message. Anyone can take a look?
1645 static files copied to '/opt/stack/horizon/static'.
+lib/horizon:init_horizon:151 DJANGO_SETTINGS_MODULE=openstack_dashboard.settings
+lib/horizon:init_horizon:151 django-admin compress --force
Found 'compress' tags in:
/opt/stack/horizon/openstack_dashboard/templates/horizon/_scripts.html
/opt/stack/horizon/openstack_dashboard/templates/horizon/_conf.html
/opt/stack/horizon/openstack_dashboard/templates/_stylesheets.html
Compressing... CommandError: An error occurred during rendering /opt/stack/horizon/openstack_dashboard/templates/_stylesheets.html: Error parsing block:
#import "headers/headers";
#import "table/table";
#import "charts/chart-tooltip";
#import "charts/pie-chart";
#import "action-list/action-list";
#import "modal-wait-spinner/modal-wait-spinner";
#import "metadata/metadata";
#import "magic-search/magic-search";
#import "table/hz-dynamic-table";
on line 56 of framework/widgets/widgets.scss
imported from line 56 of framework/framework.scss
imported from line 6 of dashboard/scss/horizon.scss
imported from line 1 of u'string:2330f72e9784e4fd:\n // My Themes\n#import "/themes/default/variables";\n\n// Horizon\n#import "/dashboard/scss/horizon.'
Traceback:
File "/usr/local/lib/python2.7/dist-packages/scss/compiler.py", line 374, in manage_children
self._manage_children_impl(rule, scope)
File "/usr/local/lib/python2.7/dist-packages/scss/compiler.py", line 385, in _manage_children_impl
block = UnparsedBlock(rule, c_lineno, c_property, c_codestr)
File "/usr/local/lib/python2.7/dist-packages/scss/rule.py", line 342, in __init__
self.header = BlockHeader.parse(prop, has_contents=bool(unparsed_contents))
File "/usr/local/lib/python2.7/dist-packages/scss/rule.py", line 252, in parse
prop, re.I)
File "/usr/lib/python2.7/re.py", line 141, in match
return _compile(pattern, flags).match(string)
File "/usr/lib/python2.7/re.py", line 249, in _compile
p = sre_compile.compile(pattern, flags)
File "/usr/lib/python2.7/sre_compile.py", line 576, in compile
code = _code(p, flags)
File "/usr/lib/python2.7/sre_compile.py", line 561, in _code
_compile(code, p.data, flags)
File "/usr/lib/python2.7/sre_compile.py", line 151, in _compile
_compile(code, av[1], flags)
File "/usr/lib/python2.7/sre_compile.py", line 192, in _compile
_compile(code, av, flags)
File "/usr/lib/python2.7/sre_compile.py", line 132, in _compile
_compile(code, av[2], flags)
File "/usr/lib/python2.7/sre_compile.py", line 107, in _compile
_compile_charset(av, flags, code, fixup, fixes)
File "/usr/lib/python2.7/sre_compile.py", line 232, in _compile_charset
flags & SRE_FLAG_UNICODE):
File "/usr/lib/python2.7/sre_compile.py", line 274, in _optimize_charset
r = range(av[0], av[1]+1)
MemoryError:
+lib/horizon:init_horizon:1 exit_trap
+./stack.sh:exit_trap:487 local r=1
++./stack.sh:exit_trap:488 jobs -p
+./stack.sh:exit_trap:488 jobs=
+./stack.sh:exit_trap:491 [[ -n '' ]]
+./stack.sh:exit_trap:497 kill_spinner
+./stack.sh:kill_spinner:383 '[' '!' -z '' ']'
+./stack.sh:exit_trap:499 [[ 1 -ne 0 ]]
+./stack.sh:exit_trap:500 echo 'Error on exit'
Error on exit
+./stack.sh:exit_trap:501 generate-subunit 1474274293 3005 fail
+./stack.sh:exit_trap:502 [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap:505 /root/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2016-09-19-092821.txt for details
+./stack.sh:exit_trap:511 exit 1
Related
I am relatively new to Python and have developed an application for myself that I would like to make an executable. It uses multiple external libraries such as Pyqt5, sqlite3, and openpyxl. I am using pyinstaller to create the .exe - the installer fails with a message "nomodulefound xml.parser.expat" i've tried a few ways to include it in my package but to no avail.
here is a replicable py example:
from decimal import Decimal
import openpyxl # xl libraries
wb = openpyxl.load_workbook(r'C:\Users\jmstr\OneDrive\Documents\finproxlc.xlsx')
myint = Decimal("27")
print("hello")
any ideas?
Here is my pyinstaller cmd: pyinstaller C:\Users\usr1\IdeaProjects\GUIProjects\finpro.py -p C:\Users\usr1\venv\Lib\site-packages\openpyxl --hidden-import openpyxl --additional-hooks-dir C:\Users\usr1\venv\Lib\site-packages\openpyxl --collect-all xml.parsers.expat
Output of the pyinstall:
['C:\Users\usr1\IdeaProjects\GUIProjects', 'C:\Users\usr1\venv\Lib\site-packages\openpyxl'] Traceback (most recent call last): File "c:\users\usr1\appdata\local\programs\python\python39\lib\runpy.py", line 197, in run_module_as_main return run_code(code, main_globals, None, File "c:\users\usr1\appdata\local\programs\python\python39\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "C:\Users\usr1\AppData\Local\Programs\Python\Python39\Scripts\pyinstaller.exe_main.py", line 7, in File "c:\users\usr1\appdata\local\programs\python\python39\lib\site-packages\PyInstaller_main.py", line 194, in console_script_run run() File "c:\users\usr1\appdata\local\programs\python\python39\lib\site-packages\PyInstaller_main.py", line 180, in run run_build(pyi_config, spec_file, **vars(args)) File "c:\users\usr1\appdata\local\programs\python\python39\lib\site-packages\PyInstaller_main.py", line 61, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "c:\users\usr1\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\building\build_main.py", line 977, in main build(specfile, distpath, workpath, clean_build) File "c:\users\usr1\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\building\build_main.py", line 899, in build exec(code, spec_namespace) File "C:\Users\usr1\finpro.spec", line 14, in a = Analysis( File "c:\users\usr1\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\building\build_main.py", line 379, in init self.hookspath += discover_hook_directories() File "c:\users\usr1\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\isolated_parent.py", line 404, in wrapped return call(function, *args, **kwargs) File "c:\users\usr1\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\isolated_parent.py", line 373, in call return isolated.call(function, *args, **kwargs) File "c:\users\usr1\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\isolated_parent.py", line 311, in call raise RuntimeError(f"Child process call to {function.name}() failed with:\n" + output) RuntimeError: Child process call to discover_hook_directories() failed with: File "c:\users\usr1\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\isolated_child.py", line 63, in run_next_command output = function(*args, **kwargs) File "c:\users\usr1\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\building\build_main.py", line 107, in discover_hook_directories import pkg_resources File "c:\users\usr1\appdata\local\programs\python\python39\lib\site-packages\pkg_resources_init_.py", line 35, in import plistlib File "c:\users\usr1\appdata\local\programs\python\python39\lib\plistlib.py", line 61, in from xml.parsers.expat import ParserCreate ModuleNotFoundError: No module named 'xml.parsers'
Seems like the installion of openpyxl was specific to my IDE (intelliJ) and i could not figure out how to change the spec file to get it to pick up but running this command resolved the issue:
python -m pip install openpyxl
I am trying to use Certbot to get new SSL cert for new domain, but I'm getting an error:
An unexpected error occurred:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 715: invalid start byte
Please see the logfiles in /var/log/letsencrypt for more details.
This is the output from the letsencrypt log, not sure how to fix this.
2021-09-28 11:24:03,054:DEBUG:certbot.main:certbot version: 0.31.0
2021-09-28 11:24:03,055:DEBUG:certbot.main:Arguments: []
2021-09-28 11:24:03,056:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2021-09-28 11:24:03,064:DEBUG:certbot.log:Root logging level set at 20
2021-09-28 11:24:03,065:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2021-09-28 11:24:03,066:DEBUG:certbot.plugins.selection:Requested authenticator None and installer None
2021-09-28 11:24:03,194:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
File "/usr/bin/certbot", line 11, in <module>
load_entry_point('certbot==0.31.0', 'console_scripts', 'certbot')()
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1365, in main
return config.func(config, plugins)
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1101, in run
installer, authenticator = plug_sel.choose_configurator_plugins(config, plugins, "run")
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 225, in choose_configurator_plugins
authenticator = installer = pick_configurator(config, req_inst, plugins)
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 25, in pick_configurator
(interfaces.IAuthenticator, interfaces.IInstaller))
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 106, in pick_plugin
verified.prepare()
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 251, in prepare
return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 251, in <listcomp>
return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 132, in prepare
self._initialized.prepare()
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 152, in prepare
self.parser = parser.NginxParser(self.conf('server-root'))
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 38, in __init__
self.load()
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 45, in load
self._parse_recursively(self.config_root)
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 66, in _parse_recursively
self._parse_recursively(subentry[1])
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 56, in _parse_recursively
trees = self._parse_files(filepath)
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 207, in _parse_files
parsed = nginxparser.load(_file)
File "/usr/lib/python3/dist-packages/certbot_nginx/nginxparser.py", line 123, in load
return loads(_file.read())
File "/usr/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 715: invalid start byte
2021-09-28 11:24:03,196:ERROR:certbot.log:An unexpected error occurred:
Based on the bug report from github, this is a unicode issue in configuration file.
Solution #1 - You need to generate an UTF-8 locale and launch certbot with it.
Like this:
LANG=en_US.UTF-8 certbot […]
Or, Solution #2 - replace unicode characters in nginx config
You can find the offending line with following command and delete it.
grep -r -P '[^\x00-\x7f]' /etc/apache2 /etc/letsencrypt /etc/nginx
And rerun certbot command.
Recently I updated R n Jupyter Lab with homebrew.
Today, I am surprised that R failed to run on ipython notebook with error below:
Error Starting Kernel
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.7/site-packages/tornado/web.py", line 1699, in _execute
result = await result
File "/opt/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/opt/anaconda3/lib/python3.7/site-packages/notebook/services/sessions/handlers.py", line 72, in post
type=mtype))
File "/opt/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/opt/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/opt/anaconda3/lib/python3.7/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 "/opt/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/opt/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/opt/anaconda3/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 101, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "/opt/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/opt/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 209, in wrapper
yielded = next(result)
File "/opt/anaconda3/lib/python3.7/site-packages/notebook/services/kernels/kernelmanager.py", line 168, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/manager.py", line 259, in start_kernel
**kw)
File "/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/manager.py", line 204, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/launcher.py", line 138, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/opt/anaconda3/lib/python3.7/subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "/opt/anaconda3/lib/python3.7/subprocess.py", line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/Cellar/r/3.5.3/lib/R/bin/R': '/usr/local/Cellar/r/3.5.3/lib/R/bin/R'
Appreciate your advice.
The interesting part of the error is.
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/Cellar/r/3.5.3/lib/R/bin/R': '/usr/local/Cellar/r/3.5.3/lib/R/bin/R'
I guess you Jupyter kernel is referencing the old installation of R that you have updated.
The first thing to do is to check what is defined in your R kernel.
Check kernel
# list all kernel
jupyter kernelspec list
#Available kernels:
# ir /opt/conda/share/jupyter/kernels/ir
# ...
You should have an ir kernel.
Check the content of the kernel definition, for example:
$ cat /opt/conda/share/jupyter/kernels/ir/kernel.json
# {"argv": ["R", "--slave", "-e", "IRkernel::main()", "--args", "{connection_file}"],
# "display_name":"R",
# "language":"R"
# }
If the command in argv is incorrect you can remove an reinstall the kernel.
Remove and reinstall the kernel
See the IRkernel installation documentation for more information.
$ jupyter kernelspec remove ir
$ R
# Install IRkernel
> install.packages('IRkernel')
# Or update it if already installed
> update.packages('IRkernel')
# Install the kernel
> IRkernel::installspec()
# Or alternatively if you want to install it system-wide
> IRkernel::installspec(user = FALSE)
I installed airflow: pip install apache-airflow, airflow initdb and started the airflow webserver airflow webserver -p 8080 but when I try to open the home page, I keep getting the error message:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)
I even tried a different version 1.10.1, I got the same issue.
Here's the full stacktrace:
Traceback (most recent call last):
File "/Users/dbrown/anaconda2/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 135, in handle
self.handle_request(listener, req, client, addr)
File "/Users/dbrown/anaconda2/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 176, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File "/Users/dbrown/anaconda2/lib/python2.7/site-packages/werkzeug/wsgi.py", line 826, in __call__
return app(environ, start_response)
File "/Users/dbrown/anaconda2/lib/python2.7/site-packages/flask/app.py", line 1997, in __call__
return self.wsgi_app(environ, start_response)
File "/Users/dbrown/anaconda2/lib/python2.7/site-packages/flask/app.py", line 1985, in wsgi_app
response = self.handle_exception(e)
File "/Users/dbrown/anaconda2/lib/python2.7/site-packages/flask/app.py", line 1547, in handle_exception
return self.finalize_request(handler(e), from_error_handler=True)
File "/Users/dbrown/anaconda2/lib/python2.7/site-packages/airflow/www/views.py", line 708, in show_traceback
info=traceback.format_exc()), 500
File "/Users/dbrown/anaconda2/lib/python2.7/site-packages/flask/templating.py", line 134, in render_template
context, ctx.app)
File "/Users/dbrown/anaconda2/lib/python2.7/site-packages/flask/templating.py", line 116, in _render
rv = template.render(context)
File "/Users/dbrown/anaconda2/lib/python2.7/site-packages/jinja2/environment.py", line 989, in render
return self.environment.handle_exception(exc_info, True)
File "/Users/dbrown/anaconda2/lib/python2.7/site-packages/jinja2/environment.py", line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File "/Users/dbrown/anaconda2/lib/python2.7/site-packages/airflow/www/templates/airflow/traceback.html", line 27, in top-level template code
{{ nukular }}Node: {{ hostname }}
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)
Here's my system information:
:~ $ python --version
Python 2.7.13 :: Anaconda, Inc.
:~ $ sw_vers
ProductName: Mac OS X
ProductVersion: 10.14.6
BuildVersion: 18G87
I re-installed anaconda python and the airflow issue disappeared. My current python version:
:~ $ python --version
Python 2.7.13 :: Anaconda 4.3.0 (x86_64)
i am new to openstack. while installing devstack on virtual box uisng ubuntu i am getting the following error. can any one help me to fix the problem. The error prompt is as follows.
cd /opt/stack/requirements
python update.py /opt/stack/cinder
Traceback (most recent call last):
File "update.py", line 505, in
main()
File "update.py", line 488, in main
options.hacking, stdout, options.verbose, non_std_reqs)
File "update.py", line 500, in _do_main
project, global_reqs, suffix, softupdate, hacking, non_std_reqs)
File "update.py", line 371, in _process_project
suffix, softupdate, hacking, project, global_reqs, non_std_reqs)
File "update.py", line 284, in _copy_requires
non_std_reqs)
File "update.py", line 255, in _sync_requirements_file
raise Exception("nonstandard requirement present.")
Exception: nonstandard requirement present.
+ exit_trap
+ local r=1
++ jobs -p
+ jobs=
+ [[ -n '' ]]
kill_spinner
'[' '!' -z '' ']'
[[ 1 -ne 0 ]]
echo 'Error on exit'
Error on exit
+ [[ -z /opt/stack/logs ]]
+ /home/faraz/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2015-06-21-174507.txt for details
+ exit 1