evilhero / mylar

An automated Comic Book downloader (cbr/cbz) for use with SABnzbd, NZBGet and torrents
GNU General Public License v3.0
976 stars 172 forks source link

configparser not found on system #990

Closed bonebox closed 9 years ago

bonebox commented 9 years ago

I'm running the latest development build of Mylar on a Synology device, and everything seems to be working properly, except for metatagging. I have both ComicTagger and configparser installed on the system. I'm able to import configparser successfully with python. I tried pointing Mylar to the installed comictagger.py, and also putting the ComicTagger source in the lib/comictaggerlib sub-directory and using the default comictagger.py, with the same results. I noticed this same issue was brought up a couple years ago (#449), but didn't appear to have a resolution. Here's the relevant portion of the log:

25-Apr-2015 11:01:19 - DEBUG   :: FOLDERMONITOR : [POST-PROCESSING] Metatagging enabled - proceeding...
25-Apr-2015 11:01:19 - DEBUG   :: FOLDERMONITOR : [META-TAGGER] dirName:/volume1/downloads
25-Apr-2015 11:01:19 - DEBUG   :: FOLDERMONITOR : [META-TAGGER] UNRAR path set to : /usr/bin/unrar
25-Apr-2015 11:01:19 - DEBUG   :: FOLDERMONITOR : [META-TAGGER] configparser not found on system. Please install manually in order to write metadata
25-Apr-2015 11:01:19 - DEBUG   :: FOLDERMONITOR : [META-TAGGER] continuing with PostProcessing, but I am not using metadata.
25-Apr-2015 11:01:19 - DEBUG   :: FOLDERMONITOR : [POST-PROCESSING] Unable to write metadata successfully - check mylar.log file. Attempting to continue without tagging...

I also noticed this error in the log, but not sure if it's related:

25-Apr-2015 11:01:19 - DEBUG   :: FOLDERMONITOR : Exception generated in thread FOLDERMONITOR: 'PostProcessor' object has no attribute 'queue'
25-Apr-2015 11:01:19 - DEBUG   :: FOLDERMONITOR : 'Traceback (most recent call last):\n  File "/volume1/@appstore/mylar/share/mylar/mylar/scheduler.py", line 78, in runAction\n    self.action.run()\n  File "/volume1/@appstore/mylar/share/mylar/mylar/PostProcessor.py", line 1131, in run\n    result = PostProcess.Process()\n  File "/volume1/@appstore/mylar/share/mylar/mylar/PostProcessor.py", line 563, in Process\n    self.Process_next(comicid,issueid,issuenumOG,ml,stat)\n  File "/volume1/@appstore/mylar/share/mylar/mylar/PostProcessor.py", line 1078, in Process_next\n    return self.queue.put(self.valreturn)\nAttributeError: \'PostProcessor\' object has no attribute \'queue\'\n'
evilhero commented 9 years ago

Did you follow the FAQ [url=http://mylar.forumatic.com/viewtopic.php?f=12&t=11] here[/url] when setting up Comictagger with mylar?

Not sure about that error, never seen it before - what version of python are you running mylar with?

bonebox commented 9 years ago

Absolutely. Read the entire thing + comments. As mentioned, I tried both methods outlined in the FAQ, and both produce this error. That same error was reported here in the issue I referenced from a couple years ago. I'm using Python 2.7.9.

evilhero commented 9 years ago

Did you install the synopackage version of mylar by chance?

bonebox commented 9 years ago

Out of curiosity, what is the actual comictagger command that Mylar runs? When I run comictagger manually, it appears to be working ok, but I'd like to try it exactly like Mylar is running it to see if I can reproduce the same error.

bonebox commented 9 years ago

I did install the synoCommunity package. Then modified versioncheck.py to point to the development branch, and updated from the web GUI. I had to manually move a couple config files around to make Mylar happy, but it appears to be working well now expect for this particular problem.

evilhero commented 9 years ago

If you have it set up properly, if you issue the 'python comictagger.py - - version' from the directory where mylar resides it should come back with the version.

Do you have your data (/lib) directory not in the same path as the root of mylar ( ie. I think synopackage breaks out things, so it's not located in path/mylar/libs/comictaggerlib but path/someotherlocation/libs/comictaggerlib/ )

evilhero commented 9 years ago

Honestly, I would try to install mylar via git and don't use the synopackage. I can pretty much guarantee it will work as expected. A lot of users have had problems using the synopackage.

bonebox commented 9 years ago

The comictagger version installed via pip is 1.1.15-beta, and the one that came with the Mylar install is 1.1.10-beta. I was wondering what the actual command-line parameters are that Mylar passes to comictagger.

I'm considering reinstalling via git, but I do like that having it installed as a package automatically starts the service when the Synology device restarts (can be done manually, I know), as well as stopping/starting via the package manager.

evilhero commented 9 years ago

Well mylar doesn't come with comictagger, never has (only the modified comictagger.py file) - I'm curious as to why it's packaged like that.

The commands vary as they are dependent on what is being passed, but mylar initially does a version check on comictagger to see if it is at the required level to use a user-specified comicvine api key (the '- - version' option). So it's failing at that point as it's coming back with the configparser error.

Can you provide your folder structure for your mylar installation? I have a feeling it has to do with the structure and you (and others) have mentioned having to move files around which makes me wonder about a few things.

I only mentioned git as I can support that (I haven't a clue about the synopackage it wasn't made or even enquired about by myself), and I know the git install will work in almost all of these cases. If it works, then it's something to do with the synopackage and the way it creates the folder structure (I would guess).

bonebox commented 9 years ago

When I said "the one that came with the Mylar install", I meant the comictagger.py file. I assume the version 1.1.10-beta is the one I downloaded separately and put in the comictaggerlib folder. Basically from the look of it, the synopackage puts most things in mylar/share/mylar/ when Mylar is expecting them in mylar/var. I moved a few of the csv files to mylar/var when I noticed the log was looking for them there.

BoneStation> pwd
/usr/local/mylar/share/mylar
BoneStation> ls
API_REFERENCE                 cherrypy                      lib                           screens
Mylar.py                      comictagger.py                logs                          substitutes_sample.csv
README.md                     custom_exceptions_sample.csv  mako                          ubuntu-mylar.init.d
bs4                           data                          mylar                         version.txt
cache                         exceptions.csv                post-processing
centos-mylar.init.d           init-scripts                  sabnzbd
bonebox commented 9 years ago

Also, I wasn't clear in my previous post, but I'm able to run comictagger.py --version just fine from command-line. It also works with other parameters.

bonebox commented 9 years ago

Here's more directory structure. The app directory appears to have config stuff for the syno package.

BoneStation> pwd
/usr/local/mylar
BoneStation> ls
app    env    share  var
BoneStation> cd app/
BoneStation> ls
config     images     mylar.cgi
BoneStation> cd ../env/
BoneStation> ls
bin      include  lib
BoneStation> cd bin/
BoneStation> ls
activate          activate.fish     easy_install      pip               pip2.7            python2
activate.csh      activate_this.py  easy_install-2.7  pip2              python            python2.7
BoneStation> cd ../include/
BoneStation> ls
python2.7
BoneStation> cd ../lib/
BoneStation> ls
python2.7
BoneStation> cd ../../share/
BoneStation> ls
mylar
BoneStation> cd mylar/
BoneStation> ls
API_REFERENCE                 cherrypy                      lib                           screens
Mylar.py                      comictagger.py                logs                          substitutes_sample.csv
README.md                     custom_exceptions_sample.csv  mako                          ubuntu-mylar.init.d
bs4                           data                          mylar                         version.txt
cache                         exceptions.csv                post-processing
centos-mylar.init.d           init-scripts                  sabnzbd
BoneStation> cd ../../var/
BoneStation> ls
Mylar.py                      custom_exceptions.csv         exceptions.csv                mylar.pid
config.ini                    custom_exceptions_sample.csv  mylar.db
BoneStation>
evilhero commented 9 years ago

If comictagger.py is in your path, it would run anywhere, can you get into the directory where mylar had the comictagger.py file (the one that came with mylar) and try doing 'python ./comictagger.py - - version' and see if it comes back with an error or not.

I'll have to see if I can follow the structure as it looks like it's abit messed up for mylar to work properly.

bonebox commented 9 years ago

Yes, I did that -- that's where the 2 different versions came from. Doing python ./comictagger.py --version from the mylar directory returns version 1.1.10-beta. Doing just a normal comictagger.py --version returns 1.1.15-beta, as that's the one installed from pip and is in my path.

evilhero commented 9 years ago

And you tried just putting the full path to comictagger.py (your pip install) in the Comictagger location field within the mylar configuration? (without the comictagger.py in the path)

How does mylar start up? Have you tried just starting mylar from the shell and doing a post-processing run? By default mylar uses the sys.executable that was used to start mylar to run Comictagger with.

bonebox commented 9 years ago

Correct.

BoneStation> which comictagger.py
/usr/bin/comictagger.py

So I put /usr/bin in the field.

bonebox commented 9 years ago

Ok, so I decided to download and run the Github development branch. I copied over the relevant files per instructions I found on the Mylar forum and started it up. I went back into settings to make sure everything was set up as before. Now I don't see any errors for comictagger/configparser in the logs, but there's also no reference to comictagger at all in the logs during post-processing. Perhaps there's not supposed to be, but it looks like it's not being run, because the comics Mylar processes aren't getting tagged. I verified that Metadata Tagging is enabled in settings, and also tried pointing to the pip installed version of comictagger (just directory), as well as leaving it blank and putting the comictaggerlib folder in mylar/lib, but no love.

evilhero commented 9 years ago

What does the mylar.log file say during post-processing? The log in the GUI only shows informational level of logging, the metatagging stuff is all at the debug level (or a vast majority of it), which can be viewed in the mylar.log file as it records all levels of logging.

bonebox commented 9 years ago

Good news, I have it working now. I just had CR tagging enabled at first, but after also enabling CBL, I noticed a path error for unrar in the log. After doing a symbolic link for that, it successfully started tagging both CR and CBL. Thanks for the help!