Giter Site home page Giter Site logo

Media library not scanning about epymc HOT 7 CLOSED

phorward avatar phorward commented on June 23, 2024
Media library not scanning

from epymc.

Comments (7)

DaveMDS avatar DaveMDS commented on June 23, 2024 1

Hi, thanks for reporting!
I'm not really sure the pull request is the best way to fix the issue, we shouldn't handle the encoding in sdb.py... but I need to dig a bit more on this issue. Will do in the next few days

from epymc.

phorward avatar phorward commented on June 23, 2024

Hello, I found the reason. Its a bug in the music.py, I'm checking out if I can fix it by myself.

from epymc.

phorward avatar phorward commented on June 23, 2024

Hey folks, I now checked it out, but was unable to fix the bug.

This is the traceback that occurs:

Traceback (most recent call last):
File "efl/ecore/efl.ecore.pyx", line 341, in efl.ecore._ecore_task_cb (efl/ecore/efl.ecore.c:3308)
File "efl/ecore/efl.ecore_idler.pxi", line 77, in efl.ecore.Idler._task_exec (efl/ecore/efl.ecore.c:9356)
File "efl/ecore/efl.ecore_idler.pxi", line 78, in efl.ecore.Idler._task_exec (efl/ecore/efl.ecore.c:9305)
File "/usr/lib/python3.5/site-packages/epymc/plugins/music/music.py", line 356, in rebuild_db_idler
if self._songs_db.id_exists('file://' + full_path):
File "/usr/lib/python3.5/site-packages/epymc/sdb.py", line 122, in id_exists
return key in self._sh
File "/usr/lib/python3.5/shelve.py", line 102, in contains
return key.encode(self.keyencoding) in self.dict
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcf3' in position 69: surrogates not allowed

The problem is, that os.listdir() returns a filename from my media library that is "/tmp/Taraxacum/Rainmaker/Taraxacum - 12 - Lo Que Faltó.mp3": The "ó" is converted by os.listdir() to a UTF-8 representation. I tried several fixes to handle it, but my knowledge is too less on Python's string encodings and the file system behavior, maybe you have a quicker solution?

from epymc.

phorward avatar phorward commented on June 23, 2024

Hello, I started a pull request, got a working version right now at my local box (I use the epymc package from arch linux aur)

from epymc.

phorward avatar phorward commented on June 23, 2024

Yeah, I really was not sure if this would be the best way, but it was a way to get it work for me. Indeed, handling these encoding errors with Python is annoying.

from epymc.

DaveMDS avatar DaveMDS commented on June 23, 2024

I'm not able to reproduce your issue :/
I tried with a file named "Test File àèìòùó asd asd.mp3", in my local harddisk, in an ntfs share and in a fat32 usb key.
EpyMC always scanned the file correctly (using python 3.5 like your)

I can think at 2 different problems:

  1. your mp3 file is strange (can you send it to me? maybe via email)
  2. your system locale is not well configured, please paste here the output of the locale command.

from epymc.

DaveMDS avatar DaveMDS commented on June 23, 2024

well, no more activitiy, I'm closing this.
Please reopen if it still occur

from epymc.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.