clinton-hall / nzbToMedia

Provides NZB and Torrent postprocessing To CouchPotatoServer, SickBeard/SickRage, HeadPhones, Mylar and Gamez
GNU General Public License v3.0
670 stars 176 forks source link

[07:09:16] [ERROR]::MAIN: Unknown current version number, don't know if we should update or not #1678

Closed brianjmurrell closed 4 months ago

brianjmurrell commented 4 years ago

Describe the bug Reports:

[07:09:16] [ERROR]::MAIN: Unknown current version number, don't know if we should update or not

in the log.

Technical Specs

  1. Running on (Windows, Linux, NAS Model etc) 'Linux'
  2. Python version '2.7.5' (yes, I know it's EOL in 28 days -- it's the python that CentOS 7 provides)
  3. Download Client (NZBget, SABnbzd, Transmission) 'SABnzbd'
  4. Intended Media Management (SickChill, CouchPotoato, Radarr, Sonarr) 'SickChill'

Expected behavior Version checking should work

Log

[07:09:16] [INFO]::MAIN: Loading config from [/net/server/src/SickChill/contrib/nzbToMedia/autoProcessMedia.cfg]
/net/server/src/SickChill/contrib/nzbToMedia/eol.py:146: LifetimeWarning: Python 2.7 is no longer supported.
  warnings.warn(msg, LifetimeWarning)
[07:09:16] [INFO]::MAIN: Python v2.7 will reach end of life in 28 days.
[07:09:16] [WARNING]::MAIN: Please upgrade to a more recent Python version.
[07:09:16] [INFO]::MAIN: Checking database structure...
[07:09:16] [DEBUG]::MAIN: Checking Initial Schema database upgrade
[07:09:16] [DEBUG]::MAIN: InitialSchema upgrade not required
[07:09:16] [INFO]::MAIN: Checking if source needs an update
[07:09:16] [DEBUG]::MAIN: cur_commit = None % (newest_commit)= 46b2e8998ce7c0e4b853272f0bdb06a558852c81, num_commits_behind = 0
[07:09:16] [ERROR]::MAIN: Unknown current version number, don't know if we should update or not
[07:09:17] [INFO]::MAIN: nzbToMedia Version:12.1.01 Branch:master (Linux 3.10.0-1062.4.1.el7.x86_64)
which: no 7z in (/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
which: no 7zr in (/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
[07:09:17] [INFO]::MAIN: #########################################################
[07:09:17] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ##
[07:09:17] [INFO]::MAIN: #########################################################
[07:09:17] [DEBUG]::MAIN: Options passed into nzbToMedia: ['./nzbToSickBeard.py', '--help']
[07:09:17] [WARNING]::MAIN: Invalid number of arguments received from client, Switching to manual run mode ...
[07:09:17] [INFO]::MAIN: Searching  for mediafiles to post-process ...
[07:09:17] [ERROR]::MAIN: Failed to add directories from  for post-processing: [Errno 2] No such file or directory: ''
[07:09:17] [DEBUG]::MAIN: No directories identified in SickBeard:sickbeard-tv for post-processing
[07:09:17] [INFO]::MAIN: The ./nzbToSickBeard.py script completed successfully.

This appears to be happening because:

$ git rev-parse --verify --quiet '@{upstream}'
error: HEAD does not point to a branch

FWIW:

$ git remote -v
origin  https://github.com/clinton-hall/nzbToMedia (fetch)
origin  https://github.com/clinton-hall/nzbToMedia (push)
clinton-hall commented 4 years ago

ok, so I see some information saying that Submodules are indeed checked out at specific commits instead of branches. https://www.git-tower.com/learn/git/faq/detached-head-when-checkout-commit

https://www.git-tower.com/learn/git/ebook/en/command-line/advanced-topics/submodules#start

So it looks like we need to use git status to get the HEAD detached at 3557a0e I'm not sure if there are other changes required for the update itself.

brianjmurrell commented 4 years ago

Yeah, typically submodules are checked out at a specific commit. I believe newer versions of git however are supposed to be able to reference a branch and will update the submodule to the tip of that branch when git submodule update is done.

In this case however, it's probably checkout out by commit hash and not being maintained by the super-module so I would prefer it just managed it's own "freshness". I suppose I could just ignore the submodule reference and check out my own independent copy and work from that. That said, it would probably be nice if this use-case worked for others in this situation also.

clinton-hall commented 4 years ago

I'll see if I can set up some submodules and test this out. I have no doubt it can be supported, I just need to have a play as I have never used submodules before.

I'll try and create a new branch for this and #1677 and if it works I look to merge it all up

Obviously you would need to manually update to that version before auto-updating would become possible ;)

clinton-hall commented 4 years ago

Can you have a play with submodule-1 branch? this works at my side, but I note that when I created the submodule, I already had

# git rev-parse --verify --quiet '@{upstream}'
46b2e8998ce7c0e4b853272f0bdb06a558852c81
# ./nzbToMedia.py
...
[13:56:47] [INFO]::MAIN: Checking if source needs an update
[13:56:48] [ERROR]::MAIN: Unknown current version number, don't know if we should update or not

when is switched the submodule to submodule-1 branch

# git rev-parse --verify --quiet '@{upstream}'
12f31ce7e1d859d6460b868eb4bc7af87acc25d7
... 
[13:57:23] [INFO]::MAIN: Checking if git needs an update
[13:57:24] [INFO]::MAIN: No update needed
[13:57:24] [INFO]::MAIN: nzbToMedia Version:12f31ce7e1d859d6460b868eb4bc7af87acc25d7 Branch:submodule-1 (Linux 4.14.x)
clinton-hall commented 4 years ago

actually, I have just merged this up to nightly, and about to merge all the way up to master.

brianjmurrell commented 4 years ago

In all honesty, I'm just now noticing that the parent project that was submoduling this project stopped doing so a couple of years ago and expect people to just maintain their own copy of this project.

I will probably just do that as I suggested previously and maintain my own separate non-submodule copy.

But having this project understand submodules is probably still a good thing.