Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-1265

Can't "Lookup in Browser": UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-7: ordinal not in range(256)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.0
    • None
    • None
    • None
    • Picard 1.4.2
      Ubuntu 18.04 beta-2
      Locale: ru_RU.UTF-8

      PyQT 4.12.1
      Qt 4.8.7
      Mutagen 1.39

      If Picard is started with my system's locale ru_RU.UTF-8 when I hit the "Lookup in Browser" button, I get:

      Can't "Lookup in Browser": UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-7: ordinal not in range(256)
      
      Traceback (most recent call last):
        File "/usr/lib/picard/picard/ui/mainwindow.py", line 864, in browser_lookup
          self.tagger.browser_lookup(self.selected_objects[0])
        File "/usr/lib/picard/picard/tagger.py", line 509, in browser_lookup
          item.filename if isinstance(item, File) else '')
        File "/usr/lib/picard/picard/browser/filelookup.py", line 130, in tagLookup
          return self._build_launch('/taglookup', params)
        File "/usr/lib/picard/picard/browser/filelookup.py", line 43, in _build_launch
          return self.launch(self._url(path, params))
        File "/usr/lib/picard/picard/browser/filelookup.py", line 39, in _url
          url = build_qurl(self.server, self.port, path=path, queryargs=params)
        File "/usr/lib/picard/picard/util/__init__.py", line 408, in build_qurl
          url.addEncodedQueryItem(k, unicode(v))
      UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-5: ordinal not in range(256)
      

      The button works on files with only lating symbols if Picard was launched in ANSI locale:

      $ LC_ALL=C picard
      

      Picard in ANSI locale fails on files with non-latin symbols in it's names buta with a different error.

      Related to ------PICARD-781------. Opened the new one since the previous was closed.

       

            samj1912 Sambhav Kothari
            dimon3000 Dmitry
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2.0