Error when installing scikits.audiolab on Raspberry PI 1 - raspberry-pi

When trying to install scikts.audiolab with pip install scikits.audiolab on my raspberry PI 1 I get the following error:
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 248, in main
return command.main(cmd_args)
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 55: ordinal not in range(128)
How can I fix this? I unfortunately don't have much experience with Linux :(

Related

Running the Tensorflow2 upgrade Script triggers an encoding error

I am currently trying to upgrade a script to be compatible with tensorflow2 by using the jupyter notebook that is provided in https://www.tensorflow.org/guide/upgrade, so that I can run it in google colab, however when I run this cell (from an Anaconda environment in windows):
!tf_upgrade_v2 \
--infile D:/Multiclass.py\
--outfile /tmp/upgraded_Multiclass_CNN_V01_31012020Copy.py
I get an encoding error:
Traceback (most recent call last):
File "d:\programdata\miniconda3\envs\env_dlexp1\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "d:\programdata\miniconda3\envs\env_dlexp1\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\ProgramData\Miniconda3\envs\Env_DLexp1\Scripts\tf_upgrade_v2.exe\__main__.py", line 7, in <module>
File "C:\Users\user\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\tools\compatibility\tf_upgrade_v2_main.py", line 139, in main
args.input_file, output_file, upgrade)
File "C:\Users\user\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\tools\compatibility\tf_upgrade_v2_main.py", line 40, in process_file
upgrader.process_file(in_filename, out_filename)
File "C:\Users\user\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\tools\compatibility\ast_edits.py", line 900, in process_file
temp_file)
File "C:\Users\user\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\tools\compatibility\ast_edits.py", line 958, in process_opened_file
lines = in_file.readlines()
File "d:\programdata\miniconda3\envs\env_dlexp1\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 14: character maps to <undefined>
I would normally change the encoding to utf-8 by doing this: open(path, mode, encoding='UTF8')
,but in this case I am clueless. I am not a programmer, so my proficiency is very limited. Please help me understand this error.
Try editing with open in line 918 of function process_file in ast_edits.py and specify encoding='utf-8', so that in the function process_opened_file the file can be read with utf-8.

Librabbitmq 2.0.0 with Python 3 gives TypeError: can't pickle memoryview objects

I am using the latest master branch of the git repo https://github.com/celery/librabbitmq and installing librabbitmq==2.0.0 for Python 3.6 by following the instructions in the readme
Using the development version
You can clone the repository by doing the following:
$ git clone git://github.com/celery/librabbitmq.git
Then install it by doing the following:
$ cd librabbitmq
$ make install # or make develop
This works fine (after installing certain binaries for c compliation in the OS), but when I then make a small a+b add task and call it with add.delay(2,2) it fails with the following error. I looked up and saw that Celery 4 uses json as serializer, so clearly it is not because if pickle serialization
Changing from librabbitmq to pyamqp broker works normally
Same exact situation in both MacOS and Ubuntu 16
[2018-04-30 23:40:02,956: CRITICAL/MainProcess] Unrecoverable error:
SystemError(' returned a result with an error set',) Traceback (most
recent call last): File
"/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/messaging.py",
line 624, in _receive_callback
return on_m(message) if on_m else self.receive(decoded, message) File
"/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/consumer/consumer.py",
line 570, in on_task_received
callbacks, File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/strategy.py",
line 145, in task_message_handler
handle(req) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/worker.py",
line 221, in _process_task_sem
return self._quick_acquire(self._process_task, req) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/async/semaphore.py",
line 62, in acquire
callback(*partial_args, **partial_kwargs) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/worker.py",
line 226, in _process_task
req.execute_using_pool(self.pool) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/request.py",
line 531, in execute_using_pool
correlation_id=task_id, File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/concurrency/base.py",
line 155, in apply_async
**options) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/billiard/pool.py",
line 1486, in apply_async
self._quick_put((TASK, (result._job, None, func, args, kwds))) File
"/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/concurrency/asynpool.py",
line 813, in send_job
body = dumps(tup, protocol=protocol) TypeError: can't pickle memoryview objects
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File
"/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/worker.py",
line 203, in start
self.blueprint.start(self) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/bootsteps.py",
line 119, in start
step.start(parent) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/bootsteps.py",
line 370, in start
return self.obj.start() File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/consumer/consumer.py",
line 320, in start
blueprint.start(self) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/bootsteps.py",
line 119, in start
step.start(parent) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/consumer/consumer.py",
line 596, in start
c.loop(*c.loop_args()) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/loops.py",
line 88, in asynloop
next(loop) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/async/hub.py",
line 354, in create_loop
cb(*cbargs) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/transport/base.py",
line 236, in on_readable
reader(loop) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/transport/base.py",
line 218, in _read
drain_events(timeout=0) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/librabbitmq-2.0.0-py3.6-macosx-10.6-intel.egg/librabbitmq/init.py",
line 227, in drain_events
self._basic_recv(timeout) SystemError: returned a result with an error set
This library is not recommended to use as rabbitmq broker with celery. Instead please try py-amqp. this is more maintained and less buggy.

Pip installing kerosene gives unicodeDecodeError

I'm trying to execute pip3 install kerosene from a nvidia-docker container. I get the error:
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-16cx_v3e/fuel/setup.py", line 10, in <module>
LONG_DESCRIPTION = f.read().strip()
File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1803: ordinal not in range(128)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-0e0cswbo/fuel/
I googled this error and saw that some people got it from having non-ascii characters in working directory or username, but I don't think this is the case for me. Does anybody know a fix or how I can look into this further?
The bug seems to be fixed in fuel 2 years ago but it's not included in the package at PyPI. Install from Github:
pip install -U git+https://github.com/mila-udem/fuel.git#egg=fuel

Can't call gsutil config in google cloud sdk?

I have downloaded latest google cloud sdk.
Now I want to use gsutil. Whatever command I call on gsutil, I get the same error:
Traceback (most recent call last):
File "D:\Programs\Google\Cloud SDK\google-cloud-sdk\bin\..\bin\bootstrapping\g
sutil.py", line 102, in <module>
main()
File "D:\Programs\Google\Cloud SDK\google-cloud-sdk\bin\..\bin\bootstrapping\g
sutil.py", line 55, in main
boto_path = os.pathsep.join(path_parts)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 9: ordinal
not in range(128)
How to change encoding of gsutil.py?

Error when using pudb with ipython

I'm trying to use PuDB with ipython as the shell, but when I drop to shell, I get the following error:
can't set attribute
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/Library/Python/2.7/site-packages/IPython/core/interactiveshell.py", line 2744, in atexit_operations
self.reset(new_session=False)
File "/Library/Python/2.7/site-packages/IPython/core/interactiveshell.py", line 1132, in reset
self.displayhook.flush()
File "/Library/Python/2.7/site-packages/IPython/core/displayhook.py", line 255, in flush
self.shell.user_ns['_oh'].clear()
KeyError: '_oh'
Error in sys.exitfunc:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/Library/Python/2.7/site-packages/IPython/core/interactiveshell.py", line 2744, in atexit_operations
self.reset(new_session=False)
File "/Library/Python/2.7/site-packages/IPython/core/interactiveshell.py", line 1132, in reset
self.displayhook.flush()
File "/Library/Python/2.7/site-packages/IPython/core/displayhook.py", line 255, in flush
self.shell.user_ns['_oh'].clear()
KeyError: '_oh'
Version details:
PuDB 2011.3.1
IPython 0.12
Python 2.7.1
Mac OS X 10.7.3
This is a known issue, and should be fixed in IPython 0.12.1 or master. Does updating to current (0.12.1) IPython help?