Versioncheck problem in Mylar3

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
Bigfireq
Posts: 23
Joined: Sat May 05, 2018 3:22 am

Versioncheck problem in Mylar3

Post by Bigfireq »

This is on Mylar3, I believe Master at v0.2.2-340-g91fad59
Windows Server 2016

I did the upgrade to Mylar 3, and it seems to be generally working, but I keep getting the following errors when I launch Mylar3:

Timestamp Level Message
2020-10-21 00:03:01 INFO config file has been loaded from: C:\mylar3\config.ini
2020-10-21 00:03:01 DEBUG If you can read this message, debug logging is now working
2020-10-21 00:03:01 INFO Verbose (DEBUG) logging is enabled
2020-10-21 00:02:26 ERROR Uncaught exception: Traceback (most recent call last):
File "mylar.py", line 386, in
main()
File "mylar.py", line 356, in main
versioncheck.versionload()
File "C:\mylar3\mylar\versioncheck.py", line 364, in versionload
version_info = getVersion()
File "C:\mylar3\mylar\versioncheck.py", line 114, in getVersion
if git[0]['name'] is not None:
KeyError: 0
2020-10-21 00:02:25 INFO Starting Mylar on http://0.0.0.0:8090/
2020-10-21 00:02:25 INFO [DIRECTORY-CHECK] Found comic directory: C:\mylar3
2020-10-21 00:02:25 INFO Sucessfully ordered 951 series in your watchlist.
2020-10-21 00:02:25 INFO Remapping the sorting to allow for new additions.
2020-10-21 00:02:25 INFO Successfully discovered local IP and locking it in as : 192.168.0.99
2020-10-21 00:02:25 INFO Correcting Null entries that make the main page break on startup.
2020-10-21 00:02:25 INFO Ensuring DB integrity - Removing all Erroneous Comics (ie. named None)
2020-10-21 00:02:25 INFO Checking to see if the database has all tables....
2020-10-21 00:02:25 INFO Setting DDL Location set to : C:\mylar3\cache
2020-10-21 00:02:25 INFO [COMICTAGGER] Version detected: 1.3.4

I have played around with replacing the config.ini from a virgin installation of Mylar3, I have edited my Gi-user to be Mylar3 (though I'm pretty sure I just misunderstood that), and I have done a lot of research on Git. Git itself seems to work fine from the command prompt of Mylar 3.

I found some support threads on this forum about a user with a similar problem, but it was closed out due to lack of activity with no solution posted.

Any ideas on how I can fix this?
User avatar
evilhero
Site Admin
Posts: 2587
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Versioncheck problem in Mylar3

Post by evilhero »

The config.ini wouldn't cause any problems with git as far as that particular error.

We had to do some git merging yesterday in order to get the python3-dev and master branches back in sync - so there was a brief period of time when both branches had the exact same commit hash. This was causing some problems with the versionchecker in Mylar producing that error.

Where did you install Mylar from - the zip (source on github) or using git clone ?
Bigfireq
Posts: 23
Joined: Sat May 05, 2018 3:22 am

Re: Versioncheck problem in Mylar3

Post by Bigfireq »

I used Git clone.
User avatar
evilhero
Site Admin
Posts: 2587
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Versioncheck problem in Mylar3

Post by evilhero »

As long as you don't have any local changes to your Mylar install (meaning you coded some changes - not the config.ini , etc), you can do the following assuming you're on the master branch:

Code: Select all

git fetch
git checkout master
git reset --hard origin/master
If you're on the python3-dev branch - just replace every instanc of master in the above snippet with python3-dev
Bigfireq
Posts: 23
Joined: Sat May 05, 2018 3:22 am

Re: Versioncheck problem in Mylar3

Post by Bigfireq »

I ran the commands, but no change. This is what I got back:
C:\mylar3>git checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.

C:\mylar3>git reset --hard origin/master
HEAD is now at 91fad59 python3-dev merge

All of this happened immediately without any files updating.

As a test, I then renamed Mylar3 to Old and used Git clone to get a new copy of Mylar (copying over the config.ini, Mylar.db, and cache) still the same problem.
User avatar
evilhero
Site Admin
Posts: 2587
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Versioncheck problem in Mylar3

Post by evilhero »

Did you do a git fetch prior to doing the git checkout? Without doing that it wouldn't pull down any information from the repo that was updated. Doing the git reset is an immediate action as it's all local to your machine.

If you did - after the reset command, you could have tried to do a git pull to see if it pulled down the new repo information.

What does your git clone command look like? I just tried it and it pulled down fine for me and ran with no versioncheck issues (detected v0.4.7 just fine).
Bigfireq
Posts: 23
Joined: Sat May 05, 2018 3:22 am

Re: Versioncheck problem in Mylar3

Post by Bigfireq »

I did, I just screwed up copying it here. I just ran through the three commands again:
C:\mylar3>git fetch

C:\mylar3>git checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.

C:\mylar3>git reset --hard origin/master
HEAD is now at 91fad59 python3-dev merge

The git clone command I'm using is just copied from your instructions. It's:
git clone https://github.com/mylar3/mylar3

And I don't remember seeing any errors. I ran py -m pip install -r requirements.txt right after that.

I still have Python 2 on the machine. Could its existence and maybe a bad path explain this? I don't use git or Python much, so I'm just casting in the dark.
User avatar
evilhero
Site Admin
Posts: 2587
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Versioncheck problem in Mylar3

Post by evilhero »

Oh hang on, you're copying over your config.ini from your mylar2 installation right ?

In the config.ini, you need to make sure that your git_branch and git_user are pointing to the correct repo:

Code: Select all

git_branch = master
git_user = mylar3
Also, as an aside - no clue what v0.2.2-340-g91fad59 is - v0.2.2 is from 10 months ago, but the g91 is a fragment of the actual latest commit for master. Were you using some 3rd party to run Mylar (ie. like docker, or the like)?
Bigfireq
Posts: 23
Joined: Sat May 05, 2018 3:22 am

Re: Versioncheck problem in Mylar3

Post by Bigfireq »

evilhero wrote: Thu Oct 22, 2020 1:16 pm Oh hang on, you're copying over your config.ini from your mylar2 installation right ?

In the config.ini, you need to make sure that your git_branch and git_user are pointing to the correct repo:

Code: Select all

git_branch = master
git_user = mylar3
Also, as an aside - no clue what v0.2.2-340-g91fad59 is - v0.2.2 is from 10 months ago, but the g91 is a fragment of the actual latest commit for master. Were you using some 3rd party to run Mylar (ie. like docker, or the like)?
That was the problem! There's something odd about notepad on my machine where it was wrapping the file lines continuously, and while I had edited the user successfully when I made the move, I believe I was missing the branch line line. I believe I fixed it up by using another config flie from a virgin installation, but apparently forgot to go back and make those changes in the back and forth.

I don't believe I was doing anything unusual with the old installation, I was running it as a straightforward installation on the root of a Windows server.
Post Reply