Problems upgrading to new version

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
zeus163
Posts: 15
Joined: Mon Feb 01, 2021 5:18 am

Problems upgrading to new version

Post by zeus163 »

I'm running Mylar Version: master [v0.4.9.4] and I think there is a new update. When I click "check for new versions" within Mylar, It says "checking for update successful" however nothing seems to happen. When I check the log files this is what it shows:

WARNING [ERROR] Could not get the latest commit from github: 'sha'

So, I must have done something when I originally installed it. I think I originally tried to install via a github command, but I couldn't get Mylar working and I believe that was because of the version of Python I was trying. Then I copied the master zip file and installed Python 3.8.1.

Do I need to follow the "Upgrading from evilhero/mylar" instructions from the GitHub page making sure to save and then copy over my config.ini, mylar.db, and cache directory before running the install command? Or is there a github command to run?

I don't want to mess this up and have to start over, so I'm a little nervous on what to do to upgrade right now.

Thanks!
User avatar
evilhero
Site Admin
Posts: 2712
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Problems upgrading to new version

Post by evilhero »

If you installed the zip into the same directory you did the git clone into, but didn't delete everything therein before doing the source install, it would leave the hidden .git folder which Mylar detects and thinks you're running a git install.

So ideal thing is to:
- move your mylar.db, config.ini and your entire cache directory outside of the Mylar directory.
- completely delete the mylar directory.
- do a git clone https://github.com/mylar3/mylar3.git from where you want to to put the mylar files.
- move all the items you moved off back into the new location (hammer everything in the new cache location if it asks).
- run Mylar.
(which I guess is the same as upgrading from the evilhero branch if I recall)

Doing the above will ensure that you're only using git going forward, which makes updating Mylar from within the program pretty straightforward.
zeus163
Posts: 15
Joined: Mon Feb 01, 2021 5:18 am

Re: Problems upgrading to new version

Post by zeus163 »

Thanks for your help. But I think I've done something wrong. Everything appears to be fine, however, Mylar is showing me that I'm running an unknown version and that I should update or close. I've run the update and Mylar says it is updating, but then it still showing me the same message. There is also no version number under settings. When looking at the logs I see some things like this:

2021-02-28 11:12:05 ERROR Output does not look like a hash, not using it
2021-02-28 11:12:05 INFO cur_branch:
2021-02-28 11:12:05 INFO cur_commit_hash:
2021-02-28 11:12:05 ERROR Couldn't find latest installed version.
2021-02-28 11:12:05 ERROR Encountered error: 'git' is not recognized as an internal or external command,
operable program or batch file.

If I click on check for new version, I get this in the logs:
INFO You are running an unknown version of Mylar. Run the updater to identify your version

I've tried a couple of times now and all with the same results. So, I'm sure I've done something wrong, but I am not sure what it is right now. I'm wondering if I should just delete the whole folder and try without using git?

Like I said, all the settings appear to have been retained, it's just this message that I'm getting. Sorry about this.
User avatar
evilhero
Site Admin
Posts: 2712
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Problems upgrading to new version

Post by evilhero »

Do you even have git installed? If you type in just git from the command line does it spit back an error?

If you do have git installed then you need to tell Mylar where it is on your system by putting the full path to the git executable in the git_path field in the config.ini (ie. git_path = /usr/bin/git)
zeus163
Posts: 15
Joined: Mon Feb 01, 2021 5:18 am

Re: Problems upgrading to new version

Post by zeus163 »

I do have git installed. I just added this to the git_path: C:\Program Files\Git\bin. However, when I simply type in git from a windows command prompt, it is not recognized as an operable program or batch file. If I run it from the git command I get all the usage applications of it. I remember when I was installing Git there were so many choices, that I could have missed something about integration into windows, but I'm not sure.

I did include location in the config.ini file, but it is still not updating correctly. I think it might have something to do with my installation of git.

I just updated it by wiping out the folder and copying over the contents of the zip file. However, when I look for an update I'm back to this error:
WARNING [ERROR] Could not get the latest commit from github: 'sha'

Do you think I should reinstall git? Sorry for my stupid questions.
User avatar
evilhero
Site Admin
Posts: 2712
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Problems upgrading to new version

Post by evilhero »

I should've been more clearer perhaps, you need to put the full path to the executable including the executable itself. Git doesn't execute as bin, it executes as git.exe, so you need to find where that is, and put the full path to that as the git_path variable.

Also the reason why it doesn't execute from the command line itself is because the git path is not located in your environment variable for Windows. If you add it to to your environment variable, you don't need to specify the git_path variable within mylar.

From google:

Code: Select all

Select Start, select Control Panel. double click System, and select the Advanced tab. Click Environment Variables. In the section System Variables, find the PATH environment variable and select it.
zeus163
Posts: 15
Joined: Mon Feb 01, 2021 5:18 am

Re: Problems upgrading to new version

Post by zeus163 »

Ha! Ha! Ha! I guess you can teach an old dog new tricks! I've got it working now. I installed Mylar using the git command within the Windows cmd prompt, copied my files back over (changing the git_path variable back to none) and then restarted Mylar. Low and behold Mylar started up with the correct version and when I checked for new versions this time, it worked without any errors.

Thanks for taking your time to help me. There are some things that take me a bit longer to figure out.
kanine
Posts: 13
Joined: Wed Jun 12, 2019 11:18 pm

Re: Problems upgrading to new version

Post by kanine »

evilhero wrote: Sun Feb 28, 2021 8:51 pm you need to put the full path to the executable including the executable itself
FWIW this seems to be working for me:

Code: Select all

git_path = "C:\Program Files\Git\cmd\git.exe"
I installed git quite some time ago but believe it was from here: https://git-scm.com/download/win
Post Reply