question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnicodeDecodeError decode error during linking

See original GitHub issue

I just got this error during linking the devel products (this is on pre-0.4.0-clean-pkgs):

Errors     << zeno_tracking_lib:symlink /home/den2pal/work/ros_ws/logs/zeno_tracking_lib/build.symlink.003.log                                                                                                                             
Stage `symlink` failed with arguments:
  package: {'package_format': 2, 'exports': [], 'buildtool_export_depends': [], 'exec_depends': [<catkin_pkg.package.Dependency object at 0x7f7a4522bb90>, <catkin_pkg.package.Dependency object at 0x7f7a4522bcb0>, <catkin_pkg.package.Dependency object at 0x7f7a4522bc50>, <catkin_pkg.package.Dependency object at 0x7f7a4522be90>, <catkin_pkg.package.Dependency object at 0x7f7a451eb050>, <catkin_pkg.package.Dependency object at 0x7f7a451eb0b0>, <catkin_pkg.package.Dependency object at 0x7f7a451eb110>, <catkin_pkg.package.Dependency object at 0x7f7a451eb170>, <catkin_pkg.package.Dependency object at 0x7f7a451eb1d0>, <catkin_pkg.package.Dependency object at 0x7f7a451eb230>, <catkin_pkg.package.Dependency object at 0x7f7a451eb290>], 'name': 'zeno_tracking_lib', 'filename': '/home/den2pal/work/ros_ws/src/pilot/TrackingLib/package.xml', 'replaces': [], 'version_abi': None, 'build_export_depends': [<catkin_pkg.package.Dependency object at 0x7f7a451eb2f0>, <catkin_pkg.package.Dependency object at 0x7f7a451eb350>, <catkin_pkg.package.Dependency object at 0x7f7a451eb3b0>, <catkin_pkg.package.Dependency object at 0x7f7a451eb410>, <catkin_pkg.package.Dependency object at 0x7f7a451eb470>, <catkin_pkg.package.Dependency object at 0x7f7a451eb4d0>, <catkin_pkg.package.Dependency object at 0x7f7a451eb530>, <catkin_pkg.package.Dependency object at 0x7f7a451eb590>, <catkin_pkg.package.Dependency object at 0x7f7a451eb5f0>, <catkin_pkg.package.Dependency object at 0x7f7a451eb650>, <catkin_pkg.package.Dependency object at 0x7f7a451eb6b0>], 'doc_depends': [], 'test_depends': [], 'maintainers': [<catkin_pkg.package.Person object at 0x7f7a45220150>], 'version': '0.0.0', 'build_depends': [<catkin_pkg.package.Dependency object at 0x7f7a451eb710>, <catkin_pkg.package.Dependency object at 0x7f7a451eb770>, <catkin_pkg.package.Dependency object at 0x7f7a451eb7d0>, <catkin_pkg.package.Dependency object at 0x7f7a451eb830>, <catkin_pkg.package.Dependency object at 0x7f7a451eb890>, <catkin_pkg.package.Dependency object at 0x7f7a451eb8f0>, <catkin_pkg.package.Dependency object at 0x7f7a451eb950>, <catkin_pkg.package.Dependency object at 0x7f7a451eb9b0>, <catkin_pkg.package.Dependency object at 0x7f7a451eba10>, <catkin_pkg.package.Dependency object at 0x7f7a451eba70>, <catkin_pkg.package.Dependency object at 0x7f7a451ebad0>], 'urls': [], 'authors': [<catkin_pkg.package.Person object at 0x7f7a45220490>], 'licenses': ['ZenoWay internal'], 'buildtool_depends': [<catkin_pkg.package.Dependency object at 0x7f7a451ebb30>], 'conflicts': [], 'description': u'Zeno Pilot TrackingLib'}
  metadata_path: /home/den2pal/work/ros_ws/.catkin_tools/profiles/default
  devel_manifest_path: /home/den2pal/work/ros_ws/.catkin_tools/profiles/default/packages/zeno_tracking_lib
  prebuild: False
  package_path: pilot/TrackingLib
  dest_devel_path: /home/den2pal/work/ros_ws/devel
  source_devel_path: /home/den2pal/work/ros_ws/devel/.private/zeno_tracking_lib
Traceback (most recent call last):
  File "/home/den2pal/work/py/catkin_tools/catkin_tools/execution/executor.py", line 148, in async_job
    event_queue))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 40: ordinal not in range(128)

It seems that I had a strange character in a library name. After deleting the .so file manually and retyping the library name in CMakeLists.txt the problem is gone and I cannot reproduce it.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
MatthiasNieuwenhuisencommented, Jun 8, 2016

Hi,

we experienced the same problem. Two packages install a library with the same name and generating the md5 sum of the libraries fails because of the encoding error. We have tried with catkin_tools 0.4.2, the master branch and the better-tracebacks version. If we remove the encode(‘utf-8’) function from line 272-273 in catkin_tools/jobs/catkin.py the collisions are correctly identified and the build process finishes. The workspace was cleanly initialized with

source /opt/ros/indigo/setup.bash
catkin init
catkin build

We have tested it with Python 2.7.6.

> locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=

A toy example to reproduce with the attached .so:

>>> import os
>>> from md5 import md5
>>> source_file = 'liblibelas.so'
>>> md5(open(os.path.realpath(source_file)).read()).hexdigest()
'fd72bce4e872072e940df0d08b5ded74'
>>> md5(open(os.path.realpath(source_file)).read().encode('utf-8')).hexdigest()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0x90 in position 24: ordinal not in range(128)

liblibelas.zip

Best, Matthias

1reaction
jbohrencommented, May 4, 2016

@TDiazT Thanks for the additional report, it looks like you’re also having the unicode error, but you’re also getting numerous symlink errors. Are you re-using a develspace built with another tool?

Read more comments on GitHub >

github_iconTop Results From Across the Web

error UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff ...
Python tries to convert a byte-array (a bytes which it assumes to be a utf-8-encoded string) to a unicode string ( str )....
Read more >
GSCE-841: Error: "UnicodeDecodeError: 'utf-8' codec can't ...
Error: "UnicodeDecodeError: 'utf-8' codec can't decode byte" returns from Alteryx.installPackages() when installing fails in Windows Japanese OS.
Read more >
'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
UnicodeDecodeError : 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte solved in Django .The error is on the line ......
Read more >
unicode decode error python utf-8 - You.com | The search ...
The Python "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte" occurs when we specify an incorrect encoding when ......
Read more >
UnicodeDecodeError in for loop - GIS Stack Exchange
Why would the script be trying to decode a unicode in the middle of a for loop? If I use the continue at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found