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)



- Dilligaf - 2012-02-23

Ok, I have a couple of thoughts
1) first check if port 8181 is in use

netstat -a | find "8181"

you should get no output, if you get output something else is using the port

2) Open a command window and run

"C:\Program Files (x86)\Python\python.exe" "c:\server apps\headphones\headphones.py"

3) I don't know if python likes being in Program Files, is that the default install directory? My python install is in c:\Python and Headphones is in C:\Headphones. I know Program Files won't let anything write to it.

4) I don't know if python likes spaces in the folder names, so again I would try putting Python and Headphones directorys in the root of C:

5) Is your python install working? Do you have any other programs that use python? Sickbeard, Couchpotato? If so are they working?

Try the above and see what happens, I don't have any other ideas right now but I'll continue to think about it.

Mike


- TeKo - 2012-02-23

I had trouble with spaces in Folder names.
Dilligaf Wrote:Ok, I have a couple of thoughts
1) first check if port 8181 is in use

netstat -a | find "8181"

you should get no output, if you get output something else is using the port

2) Open a command window and run

"C:\Program Files (x86)\Python\python.exe" "c:\server apps\headphones\headphones.py"

3) I don't know if python likes being in Program Files, is that the default install directory? My python install is in c:\Python and Headphones is in C:\Headphones. I know Program Files won't let anything write to it.

4) I don't know if python likes spaces in the folder names, so again I would try putting Python and Headphones directorys in the root of C:

5) Is your python install working? Do you have any other programs that use python? Sickbeard, Couchpotato? If so are they working?

Try the above and see what happens, I don't have any other ideas right now but I'll continue to think about it.

Mike



- monkeybounce - 2012-02-23

Dilligaf Wrote:Ok, I have a couple of thoughts
3) I don't know if python likes being in Program Files, is that the default install directory? My python install is in c:\Python and Headphones is in C:\Headphones. I know Program Files won't let anything write to it.

Try the above and see what happens, I don't have any other ideas right now but I'll continue to think about it.

Mike

Python does NOT like being in Program Files. Usually the installer drops it to c:\python or c:\python[version]

The problem Silvare is probablly having has to do with the c:\server apps\

Python doesn't always seem to want to accept "" as an escape for a string. I've seen it want the space in a folder name escaped individually.

Try moving headphones to C:\headphones and python to c:\python then from an elevated (just to rule out) command prompt (start -> search -> cmd right click on CMD -> Run as administrator) run c:\python\python.exe C:\headphones\headphones.py to run it.

Out of curiosity, what happens if you just double click the headphones.py file? Python should have added a handler for .py files and will launch it with console just by double clicking.


- Silvaire - 2012-02-23

Thanks for all the help guys. I just had a friend test it in Windows 7 also and he had no problems.

So here's my setup now:

C:\Headphones
C:\Python27

Still same thing. When I open headphones.py it flashes a command terminal, with some text (the hooks error) and closes. Running it from the commandline produces the same error:

Code:
C:\Python27>python.exe "c:\headphones\headphones.py"
Traceback (most recent call last):
  File "c:\headphones\headphones.py", line 9, in <module>
    from headphones import webstart, logger
  File "c:\headphones\headphones\webstart.py", line 8, in <module>
    from headphones.webserve import WebInterface
  File "c:\headphones\headphones\webserve.py", line 13, in <module>
    from headphones import logger, searcher, db, importer, mb, lastfm, librarysy
nc
  File "c:\headphones\headphones\importer.py", line 4, in <module>
    from lib.beets.mediafile import MediaFile
  File "c:\headphones\lib\beets\__init__.py", line 24, in <module>
    from .hooks import AlbumInfo, TrackInfo
ImportError: No module named hooks



- Silvaire - 2012-02-23

I think I had a friend fix it; he said he's not sure why it wasn't working, only that Hooks does exist and is a part of the headphones installation but that it wasn't compiled correctly. He doesn't work with Python so he was just trying stuff.


- rembo10 - 2012-02-23

Silvaire Wrote:I think I had a friend fix it; he said he's not sure why it wasn't working, only that Hooks does exist and is a part of the headphones installation but that it wasn't compiled correctly. He doesn't work with Python so he was just trying stuff.

Glad it's working


- jdoggvt - 2012-02-23

It's working pretty great! I'm having a few hiccups though:

Adding an artist via 'search' isn't working however it works fine when done via 'extra's. The error doesn't really tell me a whole lot, though:

Quote:2012-02-23 16:53:19 WARNING Attempt to query MusicBrainz for [Artist] failed: no element found: line 1, column 0
2012-02-23 16:53:13 WARNING Attempt to query MusicBrainz for [Artist] failed: no element found: line 1, column 0
2012-02-23 16:53:08 WARNING Attempt to query MusicBrainz for [Artist] failed: no element found: line 1, column 0
2012-02-23 16:53:01 WARNING Attempt to query MusicBrainz for [Artist] failed: no element found: line 1, column 0
2012-02-23 16:52:55 WARNING Attempt to query MusicBrainz for [Artist] failed: no element found: line 1, column 0

Secondly it seems like it just stops working every now and again, usually in the middle of an artist update without a lot of information. A restart fixes it but is there a way to enable more verbose logs to maybe tell what causes it to die?


- rembo10 - 2012-02-24

jdoggvt Wrote:It's working pretty great! I'm having a few hiccups though:

Adding an artist via 'search' isn't working however it works fine when done via 'extra's. The error doesn't really tell me a whole lot, though:



Secondly it seems like it just stops working every now and again, usually in the middle of an artist update without a lot of information. A restart fixes it but is there a way to enable more verbose logs to maybe tell what causes it to die?

Seems like something wrong with the server, but i'm not sure what. It went away after a server restart but it looks like it's back again, possibly due to the replication packets, but i'll find out.


- rembo10 - 2012-02-24

Looks like the searches are still going through musicbrainz.org. Ugh (the mirror doesn't include the search server).

Anyone want to throw me 40 bucks so I can upgrade my VPS plan? I can't install java on the one I have now, and that's a prerequisite for building the search server.


- rembo10 - 2012-02-24

Or if someone wants to set up a search server while I work on rewriting the musicbrainz code so we don't even have to use a mirror anymore :-)

http://bugs.musicbrainz.org/browser/search_server/trunk/README


- Johnny Awesome - 2012-02-25

@HenryFord

Any chance of a newer windows build so we can take advantage rembo10's new mirror?


- kri kri - 2012-02-26

Its easier to just install python and then run headphones through that, since you can update automatically and not have to wait for the build. It takes about 3 minutes of work.


- HenryFord - 2012-02-27

Johnny Awesome Wrote:@HenryFord

Any chance of a newer windows build so we can take advantage rembo10's new mirror?
Sorry, was cutt off over the weekend, will do as soon as I am back home tonight.


Problems with NZBMatrix - c_tripps_2k - 2012-02-29

Lately I've been running into this error when checking for wanted albums. Anyone running into this? Any help will be appreciated.


Code:
29-Feb-2012 08:40:19 - INFO :: Thread-153 : Searching for The Ting Tings Sounds
From Nowheresville since it was marked as wanted
29-Feb-2012 08:40:19 - INFO :: Thread-153 : Parsing results from <a href="http:/
/rss.nzbmatrix.com/rss.php?username=XXXXXX&ssl=1&term=The+Ting+Tings+Sounds+F
rom+Nowheresville&apikey=XXXXXXXXXXXXXXX&subcat=23&scenename=1&
english=1&age=1600&page=download">NZBMatrix</a>
Exception in thread Thread-153:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 552, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 505, in run
    self.__target(*self.__args, **self.__kwargs)
  File "D:\Program Files (x86)\Headphones\headphones\searcher.py", line 77, in s
earchforalbum
    foundNZB = searchNZB(result['AlbumID'], new)
  File "D:\Program Files (x86)\Headphones\headphones\searcher.py", line 161, in
searchNZB
    data = urllib2.urlopen(searchURL, timeout=20).read()
  File "C:\Python27\lib\socket.py", line 351, in read
    data = self._sock.recv(rbufsize)
  File "C:\Python27\lib\httplib.py", line 541, in read
    return self._read_chunked(amt)
  File "C:\Python27\lib\httplib.py", line 586, in _read_chunked
    raise IncompleteRead(''.join(value))
IncompleteRead: IncompleteRead(409 bytes read)



- rembo10 - 2012-02-29

c_tripps_2k Wrote:Lately I've been running into this error when checking for wanted albums. Anyone running into this? Any help will be appreciated.


Code:
29-Feb-2012 08:40:19 - INFO :: Thread-153 : Searching for The Ting Tings Sounds
From Nowheresville since it was marked as wanted
29-Feb-2012 08:40:19 - INFO :: Thread-153 : Parsing results from <a href="http:/
/rss.nzbmatrix.com/rss.php?username=XXXXXX&ssl=1&term=The+Ting+Tings+Sounds+F
rom+Nowheresville&apikey=XXXXXXXXXXXXXXX&subcat=23&scenename=1&
english=1&age=1600&page=download">NZBMatrix</a>
Exception in thread Thread-153:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 552, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 505, in run
    self.__target(*self.__args, **self.__kwargs)
  File "D:\Program Files (x86)\Headphones\headphones\searcher.py", line 77, in s
earchforalbum
    foundNZB = searchNZB(result['AlbumID'], new)
  File "D:\Program Files (x86)\Headphones\headphones\searcher.py", line 161, in
searchNZB
    data = urllib2.urlopen(searchURL, timeout=20).read()
  File "C:\Python27\lib\socket.py", line 351, in read
    data = self._sock.recv(rbufsize)
  File "C:\Python27\lib\httplib.py", line 541, in read
    return self._read_chunked(amt)
  File "C:\Python27\lib\httplib.py", line 586, in _read_chunked
    raise IncompleteRead(''.join(value))
IncompleteRead: IncompleteRead(409 bytes read)

I think it's a problem with nzbmatrix.

Just a heads up: My server will be going down for an hour or two to catch up on some updates. Good news: thanks to some donations I've upgraded to a better server with 2x the ram, CPU, etc so there will be some performance gains and possibly the chance of running my own search server if I can get Java working :-)