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

can't update Mylar #666

Closed Bart274 closed 9 years ago

Bart274 commented 10 years ago

Hi,

I'm using Version: bbf9c0f0e60e950aa4a98e3d684b6ee56409e481 (development) Mylar says I'm 14 commits behind. Each time I try to update Mylar gets restarted like it used to, but when it's finished restarting, I'm still in the same version and am still 14 commits behind. What's the best way for me to update? I don't want to lose my data, because I use it to determine which comics I still need to add to my Calibre server...

evilhero commented 10 years ago

Odds are a file got modified somewhere and it's asking you to stash or commit your changes behind the scenes (those type of messages are suppressed when running Mylar as a daemon).

This was taken from the mylar forums with someone having the same problem:

From a command line and from within the Mylar directory (make sure Mylar isn't running before doing this) : git fetch --all git reset --hard origin/master git pull

Then it's a simple 'git checkout development' to get on the development branch again.

I've always said you could do a : git pull git checkout development

If those don't work you could just do a new git clone command, but make sure to backup your db and config.ini (you can also back up the cache directory if you wanted as that's where the covers are stored, otherwise you'd have to refresh every series but it might be required regardless)

But either will work and it won't affect your db at all (git updates never touch the db or config files)

Bart274 commented 10 years ago

I just tried a completely new version of Mylar and just used my old config.ini and my db again. Now I'm stuck at an unknown version message :s

evilhero commented 10 years ago

Did you wipe out your existing directory or did you just do the 'git clone' ?

Try running mylar from a command prompt (console) - and then attempt to do an update via the GUI. Odds are it will throw a traceback error that will get caught in the console and it should provide more insight as to why it's failing exactly.

Bart274 commented 10 years ago

I did a clean install using the git clone to github desktop. I always run Mylar using the mylar.py script and try to update using the GUI. When I tried to update, I get the following error without any more information: 2014-04-11 16:57:14 ERROR Couldn't find latest installed version.

evilhero commented 10 years ago

Did you try doing the : git fetch --all git reset --hard origin/master git pull

The only thing I can suggest at this point is to possible try reinstalling git - or updating it....for whatever reason it looks like it can't get the required branch information. Some other individual had the a similar issue and it turned out the version of git he was using was either corrupt/bad.

necrochaos commented 10 years ago

I'm having the same issues as the OP. I'm running WIn 7. When I try to run a git fetch it tells me that it's not a command, program or batch file. Does this only work in Linux?

evilhero commented 10 years ago

You need to have Git installed. Try installing git for windows.. It's available on the github.com.

Once installed, either run things from within the Git shell program (it's like a Dos command prompt, but tied into the Git interface), or ensure git is in your environment path and then you can execute git from any Dos command prompt.

You just have to make sure you cd into the Mylar directory before executing any git commands, or else it will return an error.

necrochaos commented 10 years ago

I downloaded GitHub and I'm getting the following errors:

C:\mylar-master\Mylar [master +63 ~0 -0 !]> cd mylar C:\mylar-master\Mylar\mylar [master +2 ~0 -0 !]> git fetch --all Fetching origin fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists. error: Could not fetch origin C:\mylar-master\Mylar\mylar [master +2 ~0 -0 !]>

claym commented 10 years ago

git pull git checkout development

that should be all you need.

On Wed, Jun 11, 2014 at 8:21 PM, necrochaos notifications@github.com wrote:

I downloaded GitHub and I'm getting the following errors:

C:\mylar-master\Mylar [master +63 ~0 -0 !]> cd mylar C:\mylar-master\Mylar\mylar [master +2 ~0 -0 !]> git fetch --all Fetching origin fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists. error: Could not fetch origin C:\mylar-master\Mylar\mylar [master +2 ~0 -0 !]>

— Reply to this email directly or view it on GitHub https://github.com/evilhero/mylar/issues/666#issuecomment-45816853.

evilhero commented 10 years ago

Don't cd into Mylar from the mylar directory. Git is directory specific so if you're not issuing the commands from the root of Mylar it won't work.

(do it from c:\mylar-master\Mylar, not from c:\mylar-master\Mylar\mylar)

necrochaos commented 10 years ago

Tried the above, got this:

C:> cd mylar-master\mylar C:\mylar-master\mylar [master +63 ~0 -0 !]> git pull fatal: No remote repository specified. Please, specify either a URL or a remote name from which new revisions should be fetched. C:\mylar-master\mylar [master +63 ~0 -0 !]> git checkout development error: pathspec 'development' did not match any file(s) known to git. C:\mylar-master\mylar [master +63 ~0 -0 !]>

evilhero commented 10 years ago

I'm not sure how you installed Mylar, but you need to have installed Mylar with git clone to use Git. If you downloaded the source, you need to delete that entire directory structure and do a : git clone https://github.com/evilhero/mylar/mylar.git

Then you can issue git commands from within the directory structure.

necrochaos commented 10 years ago

I don't understand what you mean. I have GitHub installed on my desktop, but it doesn't let me add repositories from the web, only locally.

When I try to open your link in the browser I get a 404 error.

I see a clone on desktop option on the Mylar website, but it just advises me to download GitHub on my PC.

I also see a Gitclone URL, but I Don't know what to do with it.

evilhero commented 10 years ago

Ok, so let's try and break this down.

In order to use git with Mylar (and have updates working), you need to have two things - first, you need to have git installed (for windows git has a windows version which I'm going to assume you installed), and second, you need to then use git to install mylar.

To install mylar with git, you need to tell it to find the latest repo from github, download it, and then proceed to unpack it. All of this is accomplished in one line when using git.

So this is how you I do it on Windows, when I run things on a Windows machine (you can try and use the Clone Desktop option on github, I've never used it, which is why I'm explaining how I do it - but I'm assuming if you can download the .git file you can then add the repository to the git desktop):

git clone https://github.com/evilhero/mylar/mylar.git

This will retrieve the mylar repository from github and unpack the contents into the current working directory.

necrochaos commented 10 years ago

I have completed this. Mylar says the following:

You're running an unknown version of Mylar. Update or Close

Choosing update doesn't seem to do anything.

evilhero commented 10 years ago

When you click on update, what does the mylar.log file say? The console window (gitshell window)?

necrochaos commented 10 years ago

13-Jun-2014 23:31:11 - INFO :: Thread-32 : You are running an unknown version of Mylar. Run the updater to identify your version

evilhero commented 10 years ago

Is that from the .log file? It should say something about git and that it can't update because some local files have been modified.

necrochaos commented 10 years ago

I'm seeing this in the log:

13-Jun-2014 17:31:08 - INFO :: MAIN : Mylar is updating... 13-Jun-2014 17:31:08 - DEBUG :: MAIN : Trying to execute: "git pull origin master" with shell in C:\mylar 13-Jun-2014 17:31:08 - DEBUG :: MAIN : Git output: 'git' is not recognized as an internal or external command,

operable program or batch file.

13-Jun-2014 17:31:08 - DEBUG :: MAIN : Unable to find git with command git pull origin master 13-Jun-2014 17:31:08 - ERROR :: MAIN : Couldn't download latest version 13-Jun-2014 17:31:08 - WARNING :: MAIN : Mylar failed to update: 'NoneType' object has no attribute 'split'. Restarting. 13-Jun-2014 17:31:08 - INFO :: MAIN : Mylar is restarting... 13-Jun-2014 17:31:08 - INFO :: MAIN : Restarting Mylar with ['C:\Python27\python.exe', 'C:\mylar\Mylar.py', '--nolaunch'] 13-Jun-2014 17:31:09 - INFO :: MAIN : Checking to see if the database has all tables.... 13-Jun-2014 17:31:09 - INFO :: MAIN : Populating Base Exception listings into Mylar.... 13-Jun-2014 17:31:09 - INFO :: MAIN : Populating Custom Exception listings into Mylar.... 13-Jun-2014 17:31:09 - INFO :: MAIN : Ensuring DB integrity - Removing all Erroneous Comics (ie. named None) 13-Jun-2014 17:31:09 - INFO :: MAIN : Correcting Null entries that make the main page break on startup. 13-Jun-2014 17:31:09 - DEBUG :: MAIN : Trying to execute: "git rev-parse HEAD" with shell in C:\mylar 13-Jun-2014 17:31:09 - DEBUG :: MAIN : Git output: 'git' is not recognized as an internal or external command,

operable program or batch file.

13-Jun-2014 17:31:09 - DEBUG :: MAIN : Unable to find git with command git rev-parse HEAD 13-Jun-2014 17:31:09 - ERROR :: MAIN : Couldn't find latest installed version. 13-Jun-2014 17:31:09 - INFO :: MAIN : Retrieving latest version information from github 13-Jun-2014 17:31:10 - INFO :: MAIN : You are running an unknown version of Mylar. Run the updater to identify your version 13-Jun-2014 17:31:10 - INFO :: MAIN : CVAPIFIX disabled: Comicvine set to normal API site 13-Jun-2014 17:31:10 - INFO :: MAIN : Remapping the sorting to allow for new additions. 13-Jun-2014 17:31:10 - INFO :: MAIN : Sucessfully ordered -1 series in your watchlist. 13-Jun-2014 17:31:11 - INFO :: MAIN : Starting Mylar on port: 8090 13-Jun-2014 17:31:11 - INFO :: MAIN : Initiating startup-RSS feed checks. 13-Jun-2014 17:31:11 - INFO :: MAIN : RSS Feed Check was last run at : 2014-06-13 17:30:39 13-Jun-2014 17:31:11 - DEBUG :: MAIN : RSS Check has taken place less than the threshold - not initiating at this time. 13-Jun-2014 17:31:11 - INFO :: MAIN : Checking for existance of Weekly Comic listing... 13-Jun-2014 17:31:11 - INFO :: MAIN : CHECK_FOLDER SET TO: 13-Jun-2014 17:31:11 - INFO :: Thread-12 : Weekly pull list present - checking if it's up-to-date.. 13-Jun-2014 17:31:11 - DEBUG :: Thread-12 : no substitues.csv file located - not performing substitutions on weekly pull list 13-Jun-2014 17:31:11 - INFO :: Thread-12 : No new pull-list available - will re-check again in 24 hours. 13-Jun-2014 17:31:11 - INFO :: Thread-12 : Checking the Weekly Releases list for comics I'm watching... 13-Jun-2014 17:31:11 - DEBUG :: Thread-12 : You are watching for: 0 comics 13-Jun-2014 17:31:11 - DEBUG :: Thread-12 : There are 0 comics this week to get! 13-Jun-2014 17:31:11 - INFO :: Thread-12 : Finished checking for comics on my watchlist. 13-Jun-2014 17:32:49 - DEBUG :: CP Server Thread-6 : Trying to execute: "git rev-parse HEAD" with shell in C:\mylar 13-Jun-2014 17:32:49 - DEBUG :: CP Server Thread-6 : Git output: 'git' is not recognized as an internal or external command,

In the web browser it says that my version on Mylar is unrecognized. I try to setup a series and it never ends up in my comics, just spins.

necrochaos commented 10 years ago

This morning I tried the following:

C:> cd mylar C:\mylar [development +4 ~0 -0 !]> git fetch --all Fetching origin C:\mylar [development +4 ~0 -0 !]> git reset --hard origin/master HEAD is now at c522543 Merge branch 'development' C:\mylar [development +4 ~0 -0 !]> git pull Already up-to-date. C:\mylar [development +4 ~0 -0 !]> git checkout development Already on 'development' Your branch is ahead of 'origin/development' by 26 commits. (use "git push" to publish your local commits) C:\mylar [development +4 ~0 -0 !]>

necrochaos commented 10 years ago

Also getting this error even though I have experimental search checked:

14-Jun-2014 11:04:22 - ERROR :: Thread-20 : [WARNING] You have 0 search provider s enabled. I need at least ONE provider to work. Aborting search.

evilhero commented 10 years ago

Try starting mylar from within the gitshell prompt. It basically can't find git on your system so it's erroring out.

You can also try to make sure that the path to your git installation is in your PATH environment variable too.

If you get the branch is ahead or git push messages after doing the above, you need to stash your local changes and try the update again. (from within gitshell and in the mylar directory do a 'git stash')

evilhero commented 10 years ago

After Any configuration change you need to save and the shutdown /restart Mylar for the changes to take effect.