Kodi Community Forum
Headphones - Music albums & artists auto download program - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+--- Thread: Headphones - Music albums & artists auto download program (/showthread.php?tid=103688)



- fade23 - 2011-07-13

I'm receiving errors when scanning a directory:

http://pastebin.com/VAvkBp0c

It seems like it doesn't like one or more special (or non-English)characters in my directory or file names, but I'm having trouble determining which ones. I've tried eliminating some of the more obvious ones but to no avail.

When I used the old Import function it would keep going for a bit until it hit the bad one, but using the new Scan function it throws that immediately. Is there a more verbose logging I can enable to figure out exactly what directory it's bombing on?


- ghostelement - 2011-07-13

I'm unable to launch headphones on any computers that I've tried anymore. Earlier builds seemed to have worked, so I'm not sure what might have changed. Tried on Server 2008 R2 and Windows 7 x64.


- rembo10 - 2011-07-13

fade23 Wrote:I'm receiving errors when scanning a directory:

http://pastebin.com/VAvkBp0c

It seems like it doesn't like one or more special (or non-English)characters in my directory or file names, but I'm having trouble determining which ones. I've tried eliminating some of the more obvious ones but to no avail.

When I used the old Import function it would keep going for a bit until it hit the bad one, but using the new Scan function it throws that immediately. Is there a more verbose logging I can enable to figure out exactly what directory it's bombing on?

What's the path that you're supplying to headphones?


- rembo10 - 2011-07-13

ghostelement Wrote:I'm unable to launch headphones on any computers that I've tried anymore. Earlier builds seemed to have worked, so I'm not sure what might have changed. Tried on Server 2008 R2 and Windows 7 x64.

Are you using the exe? I haven't tested that.

Not much has changed in terms of requirements or anything, I just changed more of the backend stuff.

Anyone else having trouble getting it to run?

I just did a major overhaul of the code so you may want to hold off til I upload that or maybe provide a little more information so I can try to get it working. Windows 7 should run it fine but let me test it right now


- ghostelement - 2011-07-13

Didn't know there was an exe to try. I'm just double clicking on headphones.py. A cmd window pops open for a second and then closes.


- rembo10 - 2011-07-13

ghostelement Wrote:Didn't know there was an exe to try. I'm just double clicking on headphones.py. A cmd window pops open for a second and then closes.

You may have something else running on port 8181. I just tried running it on Windows 7 (x86) and it ran okay.

Try to run it from the command line so you can see the output. You may need to add python to your System Path. More info can be found here:
http://docs.python.org/using/windows.html


- ghostelement - 2011-07-13

rembo10 Wrote:You may have something else running on port 8181. I just tried running it on Windows 7 (x86) and it ran okay.

Try to run it from the command line so you can see the output. You may need to add python to your System Path. More info can be found here:
http://docs.python.org/using/windows.html

Found that EXE you were talking about and I got that to run fine. I also added a couple request issues on git for ya to look at Wink


- fade23 - 2011-07-13

rembo10 Wrote:What's the path that you're supplying to headphones?

/mnt/tank/Media/audio/music

This is a remote share mounted via SMB/CIFS


- _Mikie_ - 2011-07-13

HenryFord Wrote:It did work Smile

I compiled the newest version.
You can find the zip here:
http://www.henryford.tk/tools/headphones.zip

Just unzip and run headphones.exe - if anything goes wrong, just let me know!

Thank you kindly! However 32bit, 64bit? Getting an error saying its the wrong version. I'm running 32bit. Any ideas? Am I missing something?


- HenryFord - 2011-07-13

mhm...I'm indeed compiling on 64bit, didn't think that would be an issue though - I'll look into it Smile

Edit:
stupid me... I used the 64bit version of py2exe - could have seen this coming Wink
I'll provide the 32bit version tomorrow morning, that should also work under 64bit and the application is hardly reaching the 2GB limit - so it should work out fine. I'll post the new version tomorrow!


- david81 - 2011-07-14

fade23 Wrote:I'm receiving errors when scanning a directory:

http://pastebin.com/VAvkBp0c

It seems like it doesn't like one or more special (or non-English)characters in my directory or file names, but I'm having trouble determining which ones. I've tried eliminating some of the more obvious ones but to no avail.

When I used the old Import function it would keep going for a bit until it hit the bad one, but using the new Scan function it throws that immediately. Is there a more verbose logging I can enable to figure out exactly what directory it's bombing on?

I'm having a very similar issue. Any word on what might be the cause?

Code:
Traceback (most recent call last):
  File "/mnt/cache/.permanent/headphones/cherrypy/_cprequest.py", line 645, in respond
    response.body = self.handler()
  File "/mnt/cache/.permanent/headphones/cherrypy/lib/encoding.py", line 188, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/mnt/cache/.permanent/headphones/cherrypy/_cpdispatch.py", line 29, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/mnt/cache/.permanent/headphones/webServer.py", line 406, in musicScan
    itunesimport.scanMusic(path)
  File "/mnt/cache/.permanent/headphones/itunesimport.py", line 23, in scanMusic
    for r,d,f in os.walk(dir):
  File "/usr/lib/python2.6/os.py", line 294, in walk
    for x in walk(path, topdown, onerror, followlinks):
  File "/usr/lib/python2.6/os.py", line 294, in walk
    for x in walk(path, topdown, onerror, followlinks):
  File "/usr/lib/python2.6/os.py", line 294, in walk
    for x in walk(path, topdown, onerror, followlinks):
  File "/usr/lib/python2.6/os.py", line 284, in walk
    if isdir(join(top, name)):
  File "/usr/lib/python2.6/posixpath.py", line 70, in join
    path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 42: ordinal not in range(128)

Headphones is located in "/mnt/cache/.permanent/headphones" and the directory to be scanned is "/mnt/user/Music". Installed on a standard Unraid box.


- thezoggy - 2011-07-14

david81 Wrote:I'm having a very similar issue. Any word on what might be the cause?

Code:
Traceback (most recent call last):
  File "/mnt/cache/.permanent/headphones/cherrypy/_cprequest.py", line 645, in respond
    response.body = self.handler()
  File "/mnt/cache/.permanent/headphones/cherrypy/lib/encoding.py", line 188, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/mnt/cache/.permanent/headphones/cherrypy/_cpdispatch.py", line 29, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/mnt/cache/.permanent/headphones/webServer.py", line 406, in musicScan
    itunesimport.scanMusic(path)
  File "/mnt/cache/.permanent/headphones/itunesimport.py", line 23, in scanMusic
    for r,d,f in os.walk(dir):
  File "/usr/lib/python2.6/os.py", line 294, in walk
    for x in walk(path, topdown, onerror, followlinks):
  File "/usr/lib/python2.6/os.py", line 294, in walk
    for x in walk(path, topdown, onerror, followlinks):
  File "/usr/lib/python2.6/os.py", line 294, in walk
    for x in walk(path, topdown, onerror, followlinks):
  File "/usr/lib/python2.6/os.py", line 284, in walk
    if isdir(join(top, name)):
  File "/usr/lib/python2.6/posixpath.py", line 70, in join
    path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 42: ordinal not in range(128)

Headphones is located in "/mnt/cache/.permanent/headphones" and the directory to be scanned is "/mnt/user/Music". Installed on a standard Unraid box.



its a unicode error.. python is really bad about them. is there a 'Ã' in one of the directories it's trying to process?


- rembo10 - 2011-07-14

thezoggy Wrote:its a unicode error.. python is really bad about them. is there a 'Ã' in one of the directories it's trying to process?

Yeah it's stupid encoding issues. I'll get all those fixed tomorrow.

Made some big changes though, check 'em out: GitHub - Headphones

And if you're feeling generous: Donate!


- unabatedshagie - 2011-07-14

Just downloaded the latest version of this. When I try to add my music directory to scan for artists according to the python console it's unable to complete the scan.

Code:
14-Jul-2011 07:37:09 - INFO  :: CP Server Thread-4 : 9413 music files found
14-Jul-2011 07:39:34 - ERROR :: CP Server Thread-4 : Unable to complete the scan: 'module' object has no attribute 'ERROR'

Another thing I noticed is according to iTunes I have 14655 tracks. Oo

I'm not sure what additional information I could give that would be helpful.


- rembo10 - 2011-07-14

unabatedshagie Wrote:Just downloaded the latest version of this. When I try to add my music directory to scan for artists according to the python console it's unable to complete the scan.

Code:
14-Jul-2011 07:37:09 - INFO  :: CP Server Thread-4 : 9413 music files found
14-Jul-2011 07:39:34 - ERROR :: CP Server Thread-4 : Unable to complete the scan: 'module' object has no attribute 'ERROR'

Another thing I noticed is according to iTunes I have 14655 tracks. Oo

I'm not sure what additional information I could give that would be helpful.

Fixed, some old code remnants....

The scanner reads ".mp3", ".flac", ".aac", ".ogg", and ".ape" files - so maybe you have some other filetypes? Try the scanner now and see what happens.

If you did a git install, you can test the updater. Go to: Manage -> Check for Headphones Updates and see if it finds the new version