liberasurecode has deprecating version when install swift-all-in-one - openstack

I was install openstack swift-all-in-one on my virtual mechine with system Ubuntu Destop 14.04.
It told me that my liberausercode has deprecating version that I need to upgrade when I excute '$HOME/swift/.unittests' in terminal. But the question is how can I upgrade it.
Here is the response:
liberasurecode[11645]: liberasurecode_backend_open: dynamic linking error libJerasure.so.2: cannot open shared object file: No such file or directory
ERROR: Failure: MissingSectionHeaderError (File contains no section headers. file: /etc/swift/swift.confg, line: 1 ' cd $HOME/swift/doc; sudo cp -r saio/swift /etc/swift; cd -\n')
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
MissingSectionHeaderError: File contains no section headers.
file: /etc/swift/swift.confg, line: 1
' cd $HOME/swift/doc; sudo cp -r saio/swift /etc/swift; cd -\n'
pyeclib: WARNING: DEPRECATED WARNING: your liberasurecode 1.0.9 will be deprecated in the near future because of the issue https://bugs.launchpad.net/swift/+bug/1639691; Please upgrade to >=1.3.1 and rebuild pyeclib to suppress this message
--------------------- >> end captured logging << ---------------------
FAILED (errors=1)
/root

On websit : https://github.com/openstack/liberasurecode, I find the answer how to update the library.

Related

Getting error while running buildout for Setting Plumi and Zope Server on Linux using command "python3 bootstrap.py -c production.cfg"

I was installing Plumi for creating a production site. after installing plumi.app i faced below error whie running buildout using command : python3 bootstrap.py -c production.cfg
Note:: Zope is installed and zope user is added..
The ERROR IS BELOW::enter image description here
root#Saif:/home/plumi.app# /bin/python3 bootstrap.py && ./bin/buildout -v
ez_setup.py is deprecated and when using it setuptools will be pinned to 33.1.1 since it's the last version that supports setuptools self upgrade/installation, check https://github.com/pypa/setuptools/issues/581 for more info; use pip to install setuptools
Downloading https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip
Extracting in /tmp/tmpvwkpnumd
Now working in /tmp/tmpvwkpnumd/setuptools-33.1.1
Building a Setuptools egg in /tmp/tmpgfkbh3om
warning: no files found matching '*' under directory 'setuptools/_vendor'
/tmp/tmpgfkbh3om/setuptools-33.1.1-py3.8.egg
Couldn't find index page for 'zc.buildout' (maybe misspelled?)
Couldn't find index page for 'zc.buildout' (maybe misspelled?)
No local packages or working download links found for zc.buildout
error: Could not find suitable distribution for Requirement.parse('zc.buildout')
Traceback (most recent call last):
File "bootstrap.py", line 171, in <module>
raise Exception(
Exception: Failed to execute command:
'/bin/python3', '-c', 'from setuptools.command.easy_install import main; main()', '-mZqNxd', '/tmp/tmpgfkbh3om', 'zc.buildout'
root#Saif:/home/plumi.app# ^C
root#Saif:/home/plumi.app# python3 bootstrap.py -c production.cfg
ez_setup.py is deprecated and when using it setuptools will be pinned to 33.1.1 since it's the last version that supports setuptools self upgrade/installation, check https://github.com/pypa/setuptools/issues/581 for more info; use pip to install setuptools
Downloading https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip
Extracting in /tmp/tmp6dqehae9
Now working in /tmp/tmp6dqehae9/setuptools-33.1.1
Building a Setuptools egg in /tmp/tmpdja0839z
warning: no files found matching '*' under directory 'setuptools/_vendor'
/tmp/tmpdja0839z/setuptools-33.1.1-py3.8.egg
Couldn't find index page for 'zc.buildout' (maybe misspelled?)
Couldn't find index page for 'zc.buildout' (maybe misspelled?)
No local packages or working download links found for zc.buildout
error: Could not find suitable distribution for Requirement.parse('zc.buildout')
Traceback (most recent call last):
File "bootstrap.py", line 171, in <module>
raise Exception(
Exception: Failed to execute command:
'/usr/bin/python3', '-c', 'from setuptools.command.easy_install import main; main()', '-mZqNxd', '/tmp/tmpdja0839z', 'zc.buildout'
warning: no files found matching '*' under directory 'setuptools/_vendor'
I found out that setuptools version 33.1.1 doesn't have vendor folder.
https://github.com/pypa/setuptools/tree/v33.1.1/setuptools

Module Import Error with Nosetests and Tox

In my project, I am using tox with nosetests. Using PyCharm, my tox pipeline was passing completely including all the tests. When I execute tox on a Ubuntu18.04 container with python3, it gives me the following error:
ImportError: No module named 'my_project'
leading to the following error at the end:
ERROR: InvocationError for command /.tox/py36/bin/nosetests (exited with code 1)
my_project is the name of the module I am testing and the directory structure looks like this under /, the root dir from which I am executing tox:
my_project/
tests/
tox.ini
setup.cfg
other files
My tox.ini looks as follows:
[tox]
envlist = py36
[testenv]
commands = python3 setup.py build
nosetests
deps = -r{toxinidir}/test-requirements.txt
I have tried to provide the path to project in different ways to nosetests command but none of that works. One line that interests me is in the initial output of tox:
py36 installed: my_project # file:///.tox/.tmp/package/1/my_project-0.4.post52.dev256143400.zip,
which leads me to think if this is the reason that nosetests does not find my_project.
For details, the stack trace for the error is as follows:
ERROR: Failure: ImportError (No module named 'my_project')
Traceback (most recent call last):
File "/.tox/py36/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/.tox/py36/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/.tox/py36/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/.tox/py36/lib/python3.6/site-packages/nose/importer.py", line 79, in importFromDir
fh, filename, desc = find_module(part, path)
File "/usr/lib/python3.6/imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name) ImportError: No module named 'my_project'
I see three possible offenders.
(1) python3 setup.py build should not exist in the commands section.
# the build command is redundant, there is a special option for this.
commands = python3 setup.py build
nosetests
# The install command with it's default
install_command=python -m pip install {opts} {packages}(ARGV)
deps = -r{toxinidir}/test-requirements.txt
(2) And with Pycharm you might have added your project as a sources root (right click folder > mark directory as > sources root). Or configured it otherwise (PATH variable perhaps?) that makes my_project available in context to running it in Pycharm? This should not happen inside tox though, unless you have whitelist externals or sitepackages turned to True..
So when installed on a container this link does not exist.
(3) I can't help but notice the abscence of a setup.py or pyproject.toml. Files used to install my_project. E.g. run this command locally and debug your installation if it doesn't work:
pip install .

Pipenv error when trying to install to virtualenv

I'm trying to setup piping to output a pipfile for my employer. I'm totally new to this, and my system knowledge is lacking. Please can someone help me debug this error?
When I run :
pipenv install -e
I get the following error :
(py3) ➜ ~ git:(master) ✗ pipenv install -e
Creating a virtualenv for this project...
Pipfile: /Users/davidmellor/Pipfile
Using /Users/davidmellor/anaconda/envs/py3/bin/python (3.6.2) to create virtualenv...
⠋Already using interpreter /Users/davidmellor/anaconda/envs/py3/bin/python
Using base prefix '/Users/davidmellor/anaconda/envs/py3'
New python executable in /Users/davidmellor/.local/share/virtualenvs/davidmellor-1NR562gx/bin/python
dyld: Library not loaded: #rpath/libpython3.6m.dylib
Referenced from: /Users/davidmellor/.local/share/virtualenvs/davidmellor-1NR562gx/bin/python
Reason: image not found
ERROR: The executable /Users/davidmellor/.local/share/virtualenvs/davidmellor-1NR562gx/bin/python is not functioning
ERROR: It thinks sys.prefix is '/Users/davidmellor' (should be '/Users/davidmellor/.local/share/virtualenvs/davidmellor-1NR562gx')
ERROR: virtualenv is not compatible with this system or executable
Virtualenv location:
Creating a Pipfile for this project...
Traceback (most recent call last):
File "/Users/davidmellor/anaconda/envs/py3/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/cli.py", line 435, in install
selective_upgrade=selective_upgrade,
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/core.py", line 1759, in do_install
pypi_mirror=pypi_mirror,
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/core.py", line 639, in ensure_project
ensure_pipfile(validate=validate, skip_requirements=skip_requirements, system=system)
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/core.py", line 288, in ensure_pipfile
project.create_pipfile(python=python)
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/project.py", line 607, in create_pipfile
required_python = self.which('python')
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/core.py", line 115, in which
p = os.path.join(location, 'bin', command)
File "/Users/davidmellor/anaconda/envs/py3/lib/python3.6/posixpath.py", line 78, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
I've tried to modify my PATH within my .bashrc file as follows :
PYTHON_BIN_PATH="$/Users/davidmellor/.local/bin"
PATH="$PATH:$PYTHON_BIN_PATH"
export PATH=$HOME/.composer/vendor/bin
export DJANGO_SETTINGS_MODULE=blog.settings
But still having no luck.
Thank you so much.
Try using 'pyenv' package with pipenv.
Install 'pyenv' package by using brew install pyenv (if you don't have it).
Install python 3.6.2 using pyenv install 3.6.2. In your case you are using anaconda, so you can also install any anaconda version you would like to use.
Use pyenv install --list to see the list of python available versions
Then, export new installed python version to PATH
export PATH=${PYENV_PYTHON_VERSIONS_HOME}/3.6.2/bin
Now in 'Piplock' specify the same version.
[requires]
python_version = "3.6.2"
Finally, run remove previous virtualenv and rebuild again.
pipenv --rm
pipenv install --dev.

Error in DjangoCMS setup

I installed DjangoCMS using pip but when I try to launch:
djangocms -p . myapp
to create a new project with DjangoCMS and I answer all the setup questions I get this error:
Command /home/b.esque/Escritorio/eb/bin/python -c "import setuptools,
tokenize;file='/home/b.esque/Escritorio/eb/build/Pillow/setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record /tmp/pip-hYUC5s-record/install-record.txt
--single-version-externally-managed --compile --install-headers /home/b.esque/Escritorio/eb/include/site/python2.7 failed with error
code 1 in /home/b.esque/Escritorio/eb/build/Pillow Traceback (most
recent call last): File "/home/b.esque/Escritorio/eb/bin/djangocms",
line 9, in
load_entry_point('djangocms-installer==0.5.0', 'console_scripts', 'djangocms')() File
"/home/b.esque/Escritorio/eb/local/lib/python2.7/site-packages/djangocms_installer/main.py",
line 25, in execute
install.requirements(config_data.requirements) File "/home/b.esque/Escritorio/eb/local/lib/python2.7/site-packages/djangocms_installer/install/init.py",
line 64, in requirements
exit_status = pip.main(args) File "/home/b.esque/Escritorio/eb/local/lib/python2.7/site-packages/pip/init.py",
line 185, in main
return command.main(cmd_args) File "/home/b.esque/Escritorio/eb/local/lib/python2.7/site-packages/pip/basecommand.py",
line 161, in main
text = '\n'.join(complete_log) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13: ordinal not in range(128)
I'm using Ubuntu 12.0.4. Any ideas on how to solve this?
The problem is with pillow and python headers.
sudo apt-get install python-dev
pip install pillow
After this follow this intructions if you get this error:
EnvironmentError: Pillow is not compiled with JPEG support, see 'Libraries installation issues' documentation section.
Getting error while running django-cms demo page

Troubleshooting Parse Errors when running robot tests on Plone

I'm really not sure what's wrong with my setup. The robot tests were added recently and we've seen them run successfully on another developer's OS X machine.
I'm attempting to run the same robot tests on an Ubuntu machine with Plone and Firefox installed. The package is https://github.com/collective/collective.academicprogrammes
I had to add plone.app.robotframework to the [test] section of my develop.cfg file.
This is what my develop.cfg looks like now:
[sources]
collective.academicprogrammes = git git#github.com:collective/collective.academicprogrammes.git
[buildout]
test-packages =
collective.academicprogrammes[test]
extends =
buildout.cfg
extensions +=
mr.developer
eggs +=
Products.DocFinderTab
plone.reload
collective.academicprogrammes
parts +=
test
diazotools
zopeskel
robot
always-checkout = force
sources = sources
auto-checkout = *
[test]
recipe = zc.recipe.testrunner
defaults = ['--exit-with-status',
'--auto-color', '--auto-progress']
eggs =
${buildout:eggs}
${buildout:test-packages}
[zopeskel]
recipe = zc.recipe.egg
eggs =
ZopeSkel
Paste
PasteDeploy
PasteScript
zopeskel.diazotheme
zopeskel.dexterity
zest.releaser
${buildout:eggs}
[robot]
recipe = zc.recipe.egg
eggs =
Pillow
${test:eggs}
plone.app.robotframework
After running bin/buildout -c develop.cfg to install everything I
attempted to run bin/test -t robot I get the following errors:
File "parser.pxi", line 569, in
lxml.etree._ParserContext._handleParseResultDoc
(src/lxml/lxml.etree.c:74567) File "parser.pxi", line 650, in
lxml.etree._handleParseResult (src/lxml/lxml.etree.c:75458) File
"parser.pxi", line 590, in lxml.etree._raiseParseError
(src/lxml/lxml.etree.c:74791)
File "lxml.etree.pyx", line 2756, in lxml.etree.fromstring
(src/lxml/lxml.etree.c:54726) bash: syntax error near unexpected token
(' (precise)david#localhost:~/Plone/zeocluster$ File "parser.pxi",
line 1571, in lxml.etree._parseMemoryDocument
(src/lxml/lxml.etree.c:82792) bash: syntax error near unexpected token
... File "parser.pxi",
line 1450, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:81590) bash:
syntax error near unexpected token('
And it ends with:
AssertionError: Setup failed: WebDriverException: Message: 'Can\'t
load the profile. Profile Dir: /tmp/tmpqsX6Ky/webdriver-py-profilecopy
Firefox output: Gtk-Message: Failed to load module
"canberra-gtk-module"\n*** LOG addons.xpi: startup\n*** LOG
addons.xpi: checkForChanges\n*** LOG addons.xpi: No changes
found\n**********************************\n*
Call to xpconnect wrapped JSObject produced this error:
*\n[Exception... "\'[JavaScript Error: "this.updateDisplay is not a function" {file: "chrome://browser/content/search/search.xml" line:
83}]\' when calling method:
[nsIBrowserSearchInitObserver::onInitComplete]" nsresult: "0x80570021
(NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame ::
resource://gre/components/nsSearchService.js :: onSuccess :: line
3257" data:
yes]\n**********************************\n'
The error is two-fold. One has to do with the fact that I installed a lightweight Linux OS that didn't include all the dependencies. Specifically I had to install libcanberra.
To do this on Ubuntu I ran the following command 'sudo apt-get install libcanberra-gtk-module'. That was enough to fix the error about canberra-gtk-module.
The second issue was related to the version of Firefox used. It turns out that Selenium 2.34 is not compatible with Firefox 27 (the browser I'm using).
see:
http://selenium.googlecode.com/git/py/CHANGES
There are two options, upgrade Selenium to 2.40.0
OR
run robot browser tests against Firefox 25.
I opted to get Firefox 25 and use it when running tests.
Related information about this issue can be found here:
http://seleniumsimplified.com/problems-running-webdriver-on-firefox-26/
http://support.mozilla.org/en-US/questions/986545

Resources