Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S Solaar
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 10
    • Issues 10
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pwr-Solaar
  • Solaar
  • Merge requests
  • !303

UTF-8 file paths error on python 2

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/jrbenito/UTF8 into master Nov 09, 2016
  • Overview 14
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: jrbenito

Python 2 needs utf-8 decode since it uses 'ascii' decode by default.

Fixes #291 (closed)

Before:

$ python --version ; echo ; bin/solaar show
Python 2.7.12

Traceback (most recent call last):
  File "bin/solaar", line 42, in <module>
    init_paths()
  File "bin/solaar", line 29, in init_paths
    prefix = _path.normpath(_path.join(_path.realpath(sys.path[0]), '..'))
  File "/usr/lib/python2.7/posixpath.py", line 73, in join
    path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 44: ordinal not in range(128)
$ python --version ; echo ; bin/solaar show
Python 3.5.2

solaar: error: Logitech receiver not found

After:

$ python --version ; echo ; bin/solaar show
Python 2.7.12

solaar: error: Logitech receiver not found
$ python --version ; echo ; bin/solaar show
Python 3.5.2

solaar: error: Logitech receiver not found

Signed-off-by: Josenivaldo Benito Jr jrbenito@benito.qsl.br

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/jrbenito/UTF8