Fedora 22: ERROR: No module named '_rpmb' while building docker - python

I am trying to build docker on Fedora 22 using mock/scm integration. The error I am getting here is:
DEBUG: Preparing SCM sources
ERROR: No module named '_rpmb'
Traceback (most recent call last):
File "/usr/sbin/mock", line 829, in <module>
main()
File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 84, in trace
result = func(*args, **kw)
File "/usr/sbin/mock", line 650, in main
run_command(options, args, config_opts, commands, buildroot, state)
File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 84, in trace
result = func(*args, **kw)
File "/usr/sbin/mock", line 663, in run_command
(options.sources, options.spec) = scmWorker.prepare_sources()
File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 84, in trace
result = func(*args, **kw)
File "/usr/lib/python3.4/site-packages/mockbuild/scm.py", line 134, in prepare_sources
rpm_spec = ts.parseSpec(self.spec)
File "/usr/lib64/python3.4/site-packages/rpm/transaction.py", line 40, in parseSpec
import _rpmb
ImportError: No module named '_rpmb'
Now, I have rpmb available on my system:
[root#localhost peeyush]# sudo find / -name "*rpmb*"
/usr/lib64/librpmbuild.so.3
/usr/lib64/librpmbuild.so
/usr/lib64/librpmbuild.so.3.3.1
/usr/lib64/python2.7/site-packages/rpm/_rpmb.so
/usr/lib64/python3.4/site-packages/rpm/_rpmb.cpython-34m.so
Though mock has nothing to do with modules installed on the system, but as I can see getting rpmb is possible for chroot env. Can anyone please tell me why am I getting this error? Any pointers will be appreciated.

This is purely a RPM bug. See:
https://bugzilla.redhat.com/show_bug.cgi?id=1236493

Related

Problems with let otree devserver run

I have a Python Code to conduct an experiment. To ensure that the Code is working smoothly I wanted to run a trial round via 'otree devserver', but I always get an AttributeError message and I am stuck here. Can anyone help me out?
I have downloaded the Code from GitHub and downloaded all required packages. I am using macOS, otree-5.10.2 and django-4.1.7. Here is my full traceback / error message:
Traceback (most recent call last): File
"/Users/.otreevenv/bin/otree", line 8, in
sys.exit(execute_from_command_line()) File "/Users/.otreevenv/lib/python3.10/site-packages/otree/main.py", line
108, in execute_from_command_line
setup() File "/Users/.otreevenv/lib/python3.10/site-packages/otree/main.py", line
132, in setup
from otree import settings File "/Users/.otreevenv/lib/python3.10/site-packages/otree/settings.py",
line 50, in
OTREE_APPS = get_OTREE_APPS(settings.SESSION_CONFIGS) File "/Users/.otreevenv/lib/python3.10/site-packages/django/conf/__init__.py",
line 94, in __getattr__
val = getattr(_wrapped, name) File "/Users/.otreevenv/lib/python3.10/site-packages/django/conf/__init__.py",
line 270, in __getattr__
return getattr(self.default_settings, name) AttributeError: module 'django.conf.global_settings' has no attribute 'SESSION_CONFIGS'. Did
you mean: 'SESSION_ENGINE'?

flake8 internal error in regular expression engine

I'm trying to run flake8 on a docker django built like described here (tutorial page)
when building the docker image I get an error from flake8 which is run in an docker-compose file with like so
$ flake8 --ignore=E501,F401 .
multiprocessing.pool.RemoteTraceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **
File "/usr/local/lib/python3.8/multiprocessing/pool.py", line 48, in
return list(map(*
File "/usr/local/lib/python3.8/site-packages/flake8/checker.py", line 666, in
return checker.run_checks()
File "/usr/local/lib/python3.8/site-packages/flake8/checker.py", line 598, in run_checks
self.run_ast_checks()
File "/usr/local/lib/python3.8/site-packages/flake8/checker.py", line 495, in run_ast_checks
checker = self.run_check(plugin, tree=ast)
File "/usr/local/lib/python3.8/site-packages/flake8/checker.py", line 426, in run_check
self.processor.keyword_arguments_for( File "/usr/local/lib/python3.8/site-packages/flake8/processor.py", line 241, in keyword_arguments_for arguments[param] = getattr(self, param)
File "/usr/local/lib/python3.8/site-packages/flake8/processor.py", line 119, in file_tokens
self._file_tokens = list(
File "/usr/local/lib/python3.8/tokenize.py", line 525, in _tokenize
pseudomatch = _compile(PseudoToken).match(line, pos)
RuntimeError: internal error in regular expression engine
The above exception was the direct cause of the following exception: Traceback (most recent call last):
File "/usr/local/bin/flake8", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/flake8/main/cli.py", line 18, in main
app.run(argv)
File "/usr/local/lib/python3.8/site-packages/flake8/main/application.py", line 393, in run
self._run(argv)
File "/usr/local/lib/python3.8/site-packages/flake8/main/application.py", line 381, in _run
self.run_checks()
File "/usr/local/lib/python3.8/site-packages/flake8/main/application.py", line 300, in run_checks
self.file_checker_manager.run()
File "/usr/local/lib/python3.8/site-packages/flake8/checker.py", line 329, in run
self.run_parallel()
File "/usr/local/lib/python3.8/site-packages/flake8/checker.py", line 293, in run_parallel
for ret in pool_map:
File "/usr/local/lib/python3.8/multiprocessing/pool.py", line 448, in <genexpr>
return (item for chunk in result for item in chunk)
File "/usr/local/lib/python3.8/multiprocessing/pool.py", line 865, in next
raise value
RuntimeError: internal error in regular expression engine
When I run flake8 with the --verbose flag, I get an error like this:
Fatal Python error: deletion of interned string failed
Python runtime state: initialized
KeyError: 'FILENAME_RE'
from the tokenizer.py
Does anyone know how to solve this?
Additional Data:
running docker-compose v1.25.4 on an raspberry 3 with buster lite.
Installed and compiled Python 3.8.2 from source with the flag --enableloadable-sqlite
Thanks for helping!
If you don't care for flake8, then just delete that line. It will work. I had the same problem.
I know this isn't an answer. I would add a comment instead if I could.
I encountered a very similar error profile when I had refactored and left a lot of data which formerly had been in the top of the project down in what became the package folder. There were 33621 files including .venv, .nox, .pytest_cache, .coverage.
File "/usr/lib/python3.8/multiprocessing/pool.py", line 448, in <genexpr>
return (item for chunk in result for item in chunk)
File "/usr/lib/python3.8/multiprocessing/pool.py", line 868, in next
raise value
IndexError: string index out of range
If you see a similar signature (the parallel processing engine being overwhelmed in some way and throwing an exception), you may want to review your project directory structure and make sure that you did not put this kind of data in your sources directories.

ValueError: invalid literal for int() with base 10:'abc'

I'm trying to install devstack in my RHEL 7 VM. Earlier everything went good. But while installing the nova, its throwing the following error. How can i resolve this. Should i need to change the code in all the trace back files or any python package/module is available which can resolve this issue? I don't think it's a good idea to change the code in the mentioned files. Is there any way to proceed further.(The python version is 2.7)
Traceback (most recent call last):
File "/usr/bin/nova-manage", line 10, in <module>
sys.exit(main())
File "/opt/stack/nova/nova/cmd/manage.py", line 1725, in main
config.parse_args(sys.argv)
File "/opt/stack/nova/nova/config.py", line 55, in parse_args
rpc.init(CONF)
File "/opt/stack/nova/nova/rpc.py", line 63, in init
TRANSPORT = create_transport(get_transport_url())
File "/opt/stack/nova/nova/rpc.py", line 172, in get_transport_url
return messaging.TransportURL.parse(CONF, url_str)
File "/usr/lib/python2.7/site-packages/debtcollector/removals.py", line 261,
in wrapper
return f(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/oslo_messaging/transport.py", line
558, in parse
port = int(port)
ValueError: invalid literal for int() with base 10: 'abc'

Error when trying to compile chromium on Ubuntu 14.04

I am following this link to compile Chromium Browser and I successfully walked through each step but I get the following error at the 17th step: gclient sync:
mrgrj#mrgrj:~/chromium/buildhost/src$ gclient sync
Syncing projects: 4% ( 3/72) src/chrome/tools/test/reference_build/chrome_linSyncing projects: 5% ( 4/72) src/sdch/open-vcdiff Syncing projects: 100% (75/75), done.
________ running '/usr/bin/python src/build/landmines.py' in '/home/mrgrj/chromium/buildhost'
________ running '/usr/bin/python src/build/download_nacl_toolchains.py --mode nacl_core_sdk sync --extract' in '/home/mrgrj/chromium/buildhost'
Traceback (most recent call last):
File "src/build/download_nacl_toolchains.py", line 59, in <module>
sys.exit(Main(sys.argv[1:]))
File "src/build/download_nacl_toolchains.py", line 29, in Main
import package_version
File "/home/mrgrj/chromium/buildhost/src/native_client/build/package_version/package_version.py", line 40, in <module>
import argparse
ImportError: No module named argparse
Traceback (most recent call last):
File "/home/mrgrj/chromium/depot_tools/gclient.py", line 2313, in <module>
sys.exit(main(sys.argv[1:]))
File "/home/mrgrj/chromium/depot_tools/gclient.py", line 2299, in main
return dispatcher.execute(OptionParser(), argv)
File "/home/mrgrj/chromium/depot_tools/subcommand.py", line 252, in execute
return command(parser, args[1:])
File "/home/mrgrj/chromium/depot_tools/gclient.py", line 2056, in CMDsync
ret = client.RunOnDeps('update', args)
File "/home/mrgrj/chromium/depot_tools/gclient.py", line 1528, in RunOnDeps
self.RunHooksRecursively(self._options)
File "/home/mrgrj/chromium/depot_tools/gclient.py", line 983, in RunHooksRecursively
hook, cwd=self.root.root_dir, always=True)
File "/home/mrgrj/chromium/depot_tools/gclient_utils.py", line 293, in CheckCallAndFilterAndHeader
return CheckCallAndFilter(args, **kwargs)
File "/home/mrgrj/chromium/depot_tools/gclient_utils.py", line 538, in CheckCallAndFilter
rv, args, kwargs.get('cwd', None), None, None)
File "/home/mrgrj/chromium/depot_tools/subprocess2.py", line 37, in __init__
super(CalledProcessError, self).__init__(returncode, cmd, output=stdout)
TypeError: __init__() got an unexpected keyword argument 'output'
Any hints on how can I get rid of it ? I will update this post with any necesarry information that you'll need.
Update the python version to 2.7 or greater. One of the problems is that you don't have argparse which is on the newest version of python.

Running install mod_dav_svn and can't decipher thread error

I am relatively new to Python, and at the same time, am attempting to install mod_dav_svn into my Apache web server. I am looking to get some idea of the scope of the error I'm receiving.
At the command line, I type in 'sudo yum install mod_dav_svn' and receive this output:
Loaded plugins: fastestmirror
Determining fastest mirrors
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 229, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 104, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 339, in doCommands
self._getTs(needTsRemove)
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 101, in _getTs
self._getTsInfo(remove_only)
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 112, in _getTsInfo
pkgSack = self.pkgSack
File "/usr/lib/python2.4/site-packages/yum/init.py", line 591, in
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.4/site-packages/yum/init.py", line 434, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.4/site-packages/yum/repos.py", line 223, in populateSack
self.doSetup()
File "/usr/lib/python2.4/site-packages/yum/repos.py", line 71, in doSetup
self.ayum.plugins.run('postreposetup')
File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 176, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/fastestmirror.py", line 181, in postreposetup_hook
all_urls = FastestMirror(all_urls).get_mirrorlist()
File "/usr/lib/yum-plugins/fastestmirror.py", line 333, in get_mirrorlist
self._poll_mirrors()
File "/usr/lib/yum-plugins/fastestmirror.py", line 376, in _poll_mirrors
pollThread.start()
File "/usr/lib/python2.4/threading.py", line 416, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread
The only other question I could find with a similar error was this one: https://stackoverflow.com/search?q=can%27t+start+new+thread+python, but I'm not sure it has to do with running too many threads since I am the only one using the server, and this is one of the first python commands I have used. Could someone point me in the right direction, or towards some material that may help me troubleshoot the issue? Thanks!
Disable yum-fastermirror and you should be able to complete the install.
yum --disableplugin=fastestmirror update
Are you on a virtual machine?

Categories