Mods / ModsUpdater For Linux

Category: #Other #QoL #Utility
Author: Laerinok
Side: Both
Created: Sep 10th 2023 at 10:49 AM
Last modified: Apr 2nd at 3:31 PM
Downloads: 1190
Follow Unfollow 37

Latest version:
VS_ModsUpdater_Linux.v.1.4.0.zip


Vintage Story ModsUpdater - For Linux

 

Easily update your favorite mods

 

Keep in mind that I'm a very casual linux user. So my linux knowledge is very limited.

This a Debian-based Linux version of my ModsUpdater. For others distros, you can find the .py file in the source tab.

For more informations check out the ModsUpdater page.

INFO V2.0.0:

I’ve learned a lot from this project, and now I’m ready to move on to an entirely new version 2.0.
I started the code from scratch and added new features:

  • The ability to choose the update mode (automatic/manual). You can decide whether to update a mod or not.
  • Downgrading mods: use a lower game version + force_update = true
  • A system for migrating old/custom configurations. DONE
  • Backup of mods before updating them. DONE
  • Improved logging and error management system. DONE
  • Improved processing, multithreading enable. DONE

I still have a lot to work on; I don’t have an estimated release date yet, but progress is being made.

If you have any suggestions, now is the time to share them. If it’s within my abilities, I’ll see what I can do.

(updated 2024-12-05)

 

You can run it through the terminal :

  • Download and unzip
  • Open a terminal and go to the folder VS_ModsUpdater_Linux (or whatever the name you gave it)
  • Drag&Drop VS_ModsUpdater in the terminal to run it.

 


For server :
I added the possibility to run VS_ModsUpdater as command line with some arguments.

You can run the script with the following arguments:

  • For Linux : VS_ModsUpdater [-h] [--modspath MODSPATH] [--language LANGUAGE] [--nopause {false,true}] [--exclusion EXCLUSION [EXCLUSION ...]] [--forceupdate {false,true}] [--makepdf {false,true}]
  • For Python : VS_ModsUpdater.py [-h] [--modspath MODSPATH] [--language LANGUAGE] [--nopause {false,true}] [--exclusion EXCLUSION [EXCLUSION ...]] [--forceupdate {false,true}] [--makepdf {false,true}]

 

Options :

  • -h, --help show this help message and exit
  • --modspath MODSPATH Enter the mods directory (in quotes). Quotes are needed only if there is some space in the path-name.
  • --language LANGUAGE Set the language file (as it is named in the lang directory, without extension) (default=en_US)
  • --nopause {false,true} Disable the pause at the end of the script. You NEED to set it to true if not the script prompts and wait your intervention. (default=false)
  • --exclusion EXCLUSION [EXCLUSION ...] Write filenames of mods with extension (in quotes) you want to exclude (each mod separated by space). It's not really useful as you can set it later in the config.ini file.
  • --forceupdate {false,true} (default: false) Force ModsUpdater to download the latest versions for ALL the mods, even if they are up to date. (default=false)
  • --makepdf {false,true} (default: false) Create,at the end of the Update, a PDF file of all mods in the mods folder (default=false).

Exemple of use :
Linux : VS_ModsUpdater --language en_US --modspath "/home/VintagestoryData/mods" --nopause true

I added a .bat file (Windows) and a .sh file (Linux) if needed. You only have to edit them and set the the right path for your configuration.

License

MIT License

Copyright (c) 2024 Laerinok

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Version For Game version Downloads Release date Changelog Download 1-click mod install*
v1.4.0
301 Apr 2nd at 3:31 PM Show VS_ModsUpdater_Linux.v.1.4.0.zip
v1.3.6
112 Mar 26th at 3:32 PM Show VS_ModsUpdater_Linux.v.1.3.6.zip
v1.3.5
114 Mar 20th at 7:24 PM Show VS_ModsUpdater_Linux.v.1.3.5.zip
v1.2.0
228 Oct 20th 2023 at 10:53 AM Show VS_ModsUpdater_Linux.v.1.2.0.zip
v1.1.4
150 Oct 3rd 2023 at 8:01 PM Show VS_ModsUpdater_Linux.v.1.1.4.zip
v1.1.3
137 Sep 25th 2023 at 10:15 AM Show VS_ModsUpdater_Linux.v.1.1.3.zip
v1.1.2
148 Sep 10th 2023 at 10:51 AM Show VS_ModsUpdater_Linux.v.1.1.2.zip

59 Comments (oldest first | newest first)

💬 LaerinokAuthor, 19 hours ago

SalazarWindriver

It occurs only in some rare case, but it can happen. I don't know if you use SpearAndFand's Primitive Survival, but it had made a small disclaimer about multiple mods and how to keep a clean mod folder (troubleshooting section).
This script was my first one in Python. I learn and I didn't think every issues (or I didn't know how to deal with them). Now I feel more confortable, and the next version should be better.

💬 SalazarWindriver, 20 hours ago

Yeah I ran it without reading the wiki, that was my fault.

I have only ever had problems with multiple copies when I come back after a while and it has multiple copies enabled.  disabling has always solved that.  It was some of the reason I was looking for this updater. I was going through and cleaning up and updating my mods when I found this. 

💬 LaerinokAuthor, 22 hours ago

SalazarWindriver

Sorry for your game but:

  • Did you set the config.ini ? you have an option to update for the game version you want. If you set for v1.19.8 it won't upload v1.20.0
    You have to set:
    [Game_Version_max]
    version = 1.19.8

    All infos about config.ini are in the wiki or on the page for windows (advanced operation - via config.ini).

  • "It also downloaded multiple copies of some mods cause I still had older versions in the folder". 
    You should not have so many versions. When you manually download a mod or if you use the install method from ModDB you MUST DELETE old versions by your own. I cannot (and I don't want) check if users have a mess in their mods folder. Having multiple versions of a mod can cause many issues. You were lucky if you hadn't yet.

But whatever, the v2 will be a little bit "safer". Mods to update will be saved in a zip file before updating. I am also working  on a way to downgrade to another game version, but I meet some issues for now.

💬 SalazarWindriver, 1 day ago

This just broke my entire game. It updates to the latest version without checking compatibility. The newest version of automap markers is for 1.20 only and I'm still running 1.19.8 but it downloaded it anyway.  Love the idea but for 2.0 it should check the flags to make sure the new version will work with the installed version of the game.  It also downloaded multiple copies of some mods cause I still had older versions in the folder.

💬 LaerinokAuthor, Dec 1st at 10:02 AM

INFO V2.0.0:

I’ve learned a lot from this project, and now I’m ready to move on to an entirely new version 2.0.
I started the code from scratch and added new features:

  • A system for migrating custom configurations.
  • The ability to choose the update mode (automatic/manual). You can decide whether to update a mod or not.
  • Backup of mods before updating them.
  • Improved logging and error management system.

These features are complete. I still have a lot to work on; I don’t have an estimated release date yet, but progress is being made.

If you have any suggestions, now is the time to share them. If it’s within my abilities, I’ll see what I can do.

💬 LaerinokAuthor, Aug 26th at 7:00 AM

hron84

Hello,
I made a little break but I am going to dive into this script soon. I am working on a new version, I will try to fix this.
As you may have read, I am not a linux user (and only on Mint in a virtual machine) so my knowldeges are pretty low. Moreover, I am not a programmer. I made this script because I needed it and because I wanted to learn Python. It's the only script I've made.

That said, I know there is an issue with the ~home somewhere. But as I cannot reproduce it on my VM, it's hard to make test. I guess Debian version have some differences with Arch or others distros.
Moreover the script is made with Python 3.11.4. and I know that 3.12 brings some new features because there are some depreciation alerts.

Feel free to send me / contact me (here, on github or on Discord - same pseudo). I appreciate any help but keep in mind that I add/modify code only if I can understand it. As I said, I am learning, and I must understand what I change to be able to update it later.

💬 hron84, Aug 25th at 7:41 AM

It either does not work, or does not print out anything for me. I running the latest updater package you uploaded to the site (1.4.0) with the following parameters: ./VS_ModsUpdater --modspath "${HOME}/.config/VintagestoryData/Mods" --language en_US --nopause true and it prints out nothing, does nothing, just exits.

Please add more messages about the operations and the potential errors.

The situation was happened on latest Arch Linux, with VS 1.19.8-1 package (installed from AUR) and with Python 3.12.4. 

EDIT: I went to the GitHub and fetched the very latest code, it is also not working, not emitting any error messages besides the SyntaxWarning. I managed to fix them by following this guide for it: https://stackoverflow.com/a/77531416/182474 but the script still does nothing. The script itself is too complex to my Python knowledge so I cannot point out where could be the error.

EDIT2: I found the issue. You silently abort the script if the mods path is not exists. However, the problem is a bit deeper. In the arg_modspath() function somehow you duplicate the username in the path (so it become /home/hron/hron) if it is given by the absolute path. I was not able to decipher what the code is actually doing (because it uses Python magics), but I worked it around by checking if the path is planned to be returned is exists, if not, I check if the raw (original) path is exists and returning with that or returning a hardcoded nonexistent path. I also added an error message to inform the user about the not existing mods path. If you are interested in the fix, I can send you a PR with that.

💬 LaerinokAuthor, Aug 10th at 5:56 AM

Wolfraider

The script is made with python 3.11.4 that may be the cause of these warnings. I am working on a new version, but I didn't yet test on Linux. I will have a look at these issue. Does it stop the script or it goes on ?

EDIT: Indeed "SyntaxWarning: invalid escape sequence" was introduced with Python 3.12. I will have a look at this.

💬 Wolfraider, Aug 9th at 11:46 AM

I get a number of syntax warnings such as this one:

SyntaxWarning: invalid escape sequence '\{'
self.file_lang_path = f'lang\{args.language}.json'

It appears you have invalid backslash in your strings in a couple of places in your code.

This is using Python 12.

💬 LaerinokAuthor, Jun 13th at 3:37 PM

SturgeonFish

Indeed I noticed it was for another linux distribution. That's why I asked. As some users asked me for some other distributions it will be a good thing I that I group all info I can.
Thanks ;)

💬 SturgeonFish, Jun 13th at 12:39 PM

Laerinok Those files are only going to work for nixos, which is a linux distribution that does things a bit differently. You're free to add them to the desc/repo as you like.

💬 LaerinokAuthor, Jun 13th at 9:38 AM

SturgeonFish

Thanks for the share.

Can I ping it to the description or it's something specific to you and your friends ? I guess it's for all but I prefer to be sure ;)

💬 SturgeonFish, Jun 12th at 9:49 PM

For the 5 or so of you that I know play this game on nixos, here's my shell.nix and requirements.txt files. This got VS_ModsUpdater.py from the repo working.

 

>shell.nix

# shell.nix
{ pkgs ? import <nixpkgs> {} }:

pkgs.mkShell {
 name = "vs-mods-updater-env";

 buildInputs = [
   pkgs.python39
   pkgs.python39Packages.virtualenv
 ];

 shellHook = ''
   export PYTHONPATH=$PYTHONPATH:.
   virtualenv venv
   source venv/bin/activate
   pip install -r requirements.txt
   echo "VS Mods Updater environment loaded"
 '';
}

 

>requrements.txt

requests
fpdf2
wget
semver
bs4
rich

Pop these in the dir you extracted everything and it's just $nix-shell followed by $python VS_ModsUpdater.py

 

 

💬 LaerinokAuthor, Jun 1st at 7:41 PM

c1charge

👌 glad to see it's OK.

💬 c1charge, May 31st at 10:30 AM

@Laerinok

 

I got it working now, I thought it was looking for a folder named "Mods" so had the path specified to one level up. Once I included the Mods folder in the pathing it worked perfectly in my setup! Thank you!

💬 LaerinokAuthor, May 24th at 6:21 PM

c1charge

Can you give me your pathmods name and the config.ini file ? I guess you put mods in the mod's server folder. right ?
And I guess you didn't change the mods path in the config.ini ?

I never put mods in the game's folder but in the the VintageStoryData folder.
I think you have two choices :

  • Try to move zip files into your VintageStoryData/mods. In your case. (On my linux VM Mods are in it's /home/username/.config/VintagestoryData/Mods )
  • Edit hte config.ini and put the paths of the folder you use for mods. but I don't know if the creative/essentials/survival files will cause issue or not, as they are not in the moddb.
💬 c1charge, May 24th at 5:39 PM

Laerinok

The modpath is correct, and the only other files in the folder are the default surival, creative, and essentials files. Otherwise there are plenty of .zips in there!

💬 LaerinokAuthor, May 24th at 3:53 PM

c1charge

Hello,

This message should occurs only if there is no .zip file in the mods folder which seems not  being your case. Strange.
Do you have other files than the .zip in the mods folder ?

Just to be sure, the modpath in the config.ini file is the good one that leads to server's modspath ?

💬 c1charge, May 24th at 3:03 PM

Hello, not sure what I am doing wrong here. I got the program to load on my Linux Server, and when I point it to my Mods folder for the server I only get a "No mods in the Mods folder" error. Is it looking for something else in that folder other than the .zips? Thank you!

💬 LaerinokAuthor, Apr 8th at 6:20 AM

😀

💬 Bazim, Apr 8th at 3:14 AM

This is so nice for a linux server. Thank you very much for it.

💬 LaerinokAuthor, Mar 20th at 11:23 AM

effgee

Versioning issue for Xlib and Xskills is fixed. It will be in the next update. I want to fix another issue I met with pdf creation with cyrillic font. I could add an argument to be able to create a pdf file of the mods in the server. Don't know if it will be useful, but it is quite easy to make.
According to your suggestion, I can add too an argument to force update. The easiest way is either to force updating all the mods or only one. But if you need to force updating several mods, you will have to add as many argument as mods. Don't know if it will be easy to use.

I will think about it. ModsUpdater grow with user's suggestions 😀

💬 effgee, Mar 20th at 9:49 AM

@Laerinok

Hello! Glad to hear back from you!

Yes I am running this on a dedicated server, Debian 12/Bookworm based.

It worked without any difficulties whatsoever, I just used the command line (binary) and pointed it to my mod folder. 

 

If you would like a feature suggestion, perhaps being able to force update a mod to most recent release.

It seems your retreival function for most recent mod release works perfect, being able to say, force install a certain mod would be useful in some cases as well. ex. Suspected corruption or undoing modification/testing. Maybe something for the future! ;)

💬 LaerinokAuthor, Mar 19th at 3:32 PM

effgee

Glad to see this version is useful. As I am not a great Linux user, it was not easy for me ^^.

Thanks for your feedback. Indeed it's another versioning issue I've never met before... I'll fix it as soon as possible. And in the same time I will try to update to 1.3.4 too. I should have done it by now...
I notice too there is a small issue with the new version link. It links to the Windows version.

Moreover I see "Cairns 1: ERROR !!! The modder did not fill in the modid in the modinfo.json file. Unable to get the update.". I thought I've fixed this issue and it should be able to update. I will have a look into this.

PS : I didn't really have any kind of feedback on use on servers. Do you use it on servers ?

💬 effgee, Mar 19th at 1:48 PM

Hey great to see linux support. Really useful on servers.

 

Came across an "edge" case where the script fails to understand there is an update, have a look at the log.

If you notice, the script while it sees the updated versions for 

Xlib and Xskills it does not update them. Probably a parsing issue due to using the rc.X on their versioning. :P

----------------------------------------------

Vintage Story Mod Updater - v.1.2.0 by Laerinok

New version of ModsUploader available !! mods.vintagestory.at/download?fileid=19584


Limit mod updates to game version : Latest version

A Tad More Charcoal: installed version : 1.0.0 - last version : 1.0.0
Accessibility Tweaks: installed version : 3.6.1 - last version : 3.6.1
Anvil Metal Recovery+: installed version : 0.1.19-pre.1 - last version : 0.1.19-pre.1
Arrownd: installed version : 1.0.0 - last version : 1.0.0
Better-Drifters: installed version : 2.1.3 - last version : 2.1.3
BetterMoisture: installed version : 1.0.0 - last version : 1.0.0
BetterPoultice2: installed version : 1.0.2 - last version : 1.0.2
Blacksmith Enhancements: installed version : 1.0.4 - last version : 1.0.5
File size : 0.1 MB
Blacksmith Enhancements v.1.0.5 download in progress...
100% [............................................................................] 105888 / 105888

Blacksmithname: installed version : 1.1.6 - last version : 1.1.6
Butchering: installed version : 1.5.4 - last version : 1.5.4
Buzzy Bees: installed version : 1.0.1 - last version : 1.0.1
Cairns 1: ERROR !!! The modder did not fill in the modid in the modinfo.json file. Unable to get the update.
Chiseltools: installed version : 1.10.5 - last version : 1.10.5
ColoredTorchesRedux: installed version : 1.1.0 - last version : 1.1.0
Config lib: installed version : 1.0.2 - last version : 1.1.1
File size : 0.17 MB
Config lib v.1.1.1 download in progress...
100% [............................................................................] 175723 / 175723

Configure Everything: installed version : 1.1.0 - last version : 1.1.0
Cooperative Combat: installed version : 1.1.1 - last version : 1.1.1
Creatures & Critters (Unofficial): installed version : 1.0.6 - last version : 1.0.6
Entities Interact: installed version : 1.0.3 - last version : 1.0.3
Fantasy Creatures Mod: installed version : 0.7.1 - last version : 0.7.1
History of existence: installed version : 0.0.3 - last version : 0.0.3
Icecold: installed version : 0.5.1 - last version : 0.5.1
Immersive Wood Chopping: installed version : 0.7.1 - last version : 0.7.1
Immersive Wood Sawing: installed version : 0.1.1 - last version : 0.1.1
Instand Drifter Drops: installed version : 1.1.0 - last version : 1.1.0
Just An Arrowhead Mold: installed version : 1.0.1 - last version : 1.0.1
Lumber Sling: installed version : 1.1.0 - last version : 1.1.0
Bows: installed version : 1.0.4 - last version : 1.0.4
More Bags: installed version : 1.2.0 - last version : 1.2.0
MoveLikeKaji: installed version : 0.0.5 - last version : 0.0.5
The Night Watcher: installed version : 2.0.0 - last version : 2.0.0
NoCharcoalLost: installed version : 1.0.0 - last version : 1.0.0
Normalizer: installed version : 1.0.1 - last version : 1.0.1
Outlaw Mod: installed version : 1.2.2 - last version : 1.2.2
Pick Up Fast: installed version : 1.0.2 - last version : 1.0.2
Primitive Survival: installed version : 3.4.9 - last version : 3.4.9
PropickFix: installed version : 1.0.0 - last version : 1.0.0
Re: ERROR !!! The modder did not fill in the modid in the modinfo.json file. Unable to get the update.
SilentSave: installed version : 1.0.4 - last version : 1.0.4
Simple Footsteps: installed version : 1.1.7 - last version : 1.1.7
Nat's Survival Nutrition: installed version : 1.0.0 - last version : 1.0.0
Temporal gears stack: installed version : 1.0.0 - last version : 1.0.0
The Critters Pack: installed version : 0.9.1 - last version : 0.9.1
EasyTorchLight: installed version : 1.0.0 - last version : 1.0.0
Vanity: installed version : 2.1.1 - last version : 2.1.2
File size : 0.04 MB
Vanity v.2.1.2 download in progress...
100% [..............................................................................] 39041 / 39041

Dear ImGui: installed version : 1.1.2 - last version : 1.1.2
Wild Farming Revival: installed version : 1.1.8 - last version : 1.1.8
Xandus Inventory Tweaks: installed version : 1.5.9-rc.1 - last version : 1.5.9-rc.1
XLib: installed version : 0.8.0-rc.1 - last version : 0.8.0-rc.2
XSkills: installed version : 0.8.0-rc.1 - last version : 0.8.0-rc.2
End of search.

The following mods have been updated:
- Blacksmith Enhancements :
Changelog v1.0.5 :
* Fixed - noticeable z-fighting when player is wearing armor.
* Fixed - when player is using bellow and moves it to the chest at the same time it would make player animator get stuck.
* Fixed - sometime when player is using bellow it would get stuck and so would player animator
*
*
*
*
*
- Config lib :
Changelog v1.1.1 :
* Fixed nullref bug
- Vanity :
Changelog v2.1.2 :
* <span style="font-weight: 400;"><strong>Tweak:</strong> Removed ‘requiredOnClient: false’ from modinfo.json to prompt auto-download when connecting
to server with Vanity installed.</span>
Press the ENTER key to continue...^[[B

💬 LaerinokAuthor, Feb 26th at 7:49 AM

I have not yet made a binary file for the v1.3.2. I have to be sure before it works as expected with linux. But for those who desire, the .py file is available in the github release.  And thanks to a suggestion, there is also now a requirements.txt file.

💬 LaerinokAuthor, Nov 14th 2023 at 5:28 PM

Drathek

Thanks for the help and instructions. No doubt it will be useful for users.

💬 Drathek, Nov 14th 2023 at 4:20 PM

Also ran into similar problems using this on Manjaro, so needed to download the .py from the github and then use venv to set up a virtual enviorment so pip could be used to install python dependencies.

 

Assuming you have python3 installed and have placed the VS_ModsUpdater.py file from the github, this is the batch file I've been using to run/setup:

 

cd "$(dirname "$0")"
if ! [ -d .venv ]
then
    python3 -m venv .venv
    source .venv/bin/activate
    python3 -m pip install wget semver requests rich bs4
else
    source .venv/bin/activate
fi
python3 VS_ModsUpdater.py



The cd is to resolve issues if you set up a .desktop to run this batch file. The test for a .venv folder is to determine if this is a first time setup. "source .venv/bin/activate" is to tell it to use that virtual enviorment. Other dependencies may be required, but those are the ones I needed to have it install. Can probably streamline it if it has a requirements.txt instead.

💬 LaerinokAuthor, Oct 27th 2023 at 7:08 PM

8Helio8

Hello,

Is it a fresh installation or you updated from an old version ? Is it the latest version ? Didn't you forgive to extract the lang directory ? Did you "just" run the VS_ModsUpdater file or or you use the  command line ?
It doesn't seem it's missing any dependancies. You can check the VS_ModsUpdater.py if you want to see what dependencies are used. Or even run the py.

I believe Yskar
had the same issue (cf: link - link2) but he was on Arch Linux. And finally got it work with the .py file.

 

For your information: I tried it on Linux Mint 21 on VIrtualBox. Python 3.11

💬 8Helio8, Oct 27th 2023 at 11:37 AM

@Laerinok
I have find an issue with an SSL certificate.
Dont know what to do with it. I ran the latest version. Am I missing some dependency? I ran it on Fedora Linux (the newest everything). I will try it on linux mint as I host my dedicated server on that while fedora is my personal laptop.

SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain
(_ssl.c:1006)
Traceback (most recent call last):
File "urllib/request.py", line 1348, in do_open
File "http/client.py", line 1286, in request
File "http/client.py", line 1332, in _send_request
File "http/client.py", line 1281, in endheaders
File "http/client.py", line 1041, in _send_output
File "http/client.py", line 979, in send
File "http/client.py", line 1458, in connect
File "ssl.py", line 517, in wrap_socket
File "ssl.py", line 1108, in _create
File "ssl.py", line 1379, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "VS_ModsUpdater.py", line 123, in check_update_script
File "urllib/request.py", line 216, in urlopen
File "urllib/request.py", line 519, in open
File "urllib/request.py", line 536, in _open
File "urllib/request.py", line 496, in _call_chain
File "urllib/request.py", line 1391, in https_open
File "urllib/request.py", line 1351, in do_open
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "VS_ModsUpdater.py", line 589, in <module>
File "VS_ModsUpdater.py", line 393, in accueil
File "VS_ModsUpdater.py", line 141, in check_update_script
NameError: name 'err_lang' is not defined
[96539] Failed to execute script 'VS_ModsUpdater' due to unhandled exception!

💬 LaerinokAuthor, Oct 20th 2023 at 1:23 PM

No ;) there's no missing files. the .py is no needed to run the script. It was only for test in the pre-release you might have.
But it's avalaible in the Source page if needed.

💬 Vlammar, Oct 20th 2023 at 12:52 PM

@laerinok there may be an issue with your files, on the two last versions it is missing the .py script

 

💬 LaerinokAuthor, Oct 20th 2023 at 11:54 AM

Kaofan

Can you join me at Discord ? It will be easier. (my pseudo is laerinok)

💬 Kaofan, Oct 20th 2023 at 11:48 AM

Laerinok

[Pterodactyl Daemon]: Finished pulling Docker container image
container@pterodactyl~ dotnet --version
7.0.402
:/home/container$ ./VS_ModsUpdater/VS_ModsUpdater.sh && ./VintagestoryServer --dataPath ./data --port=${SERVER_PORT} --maxclients=${MAX_CLIENTS} ${OPTIONS}
./VS_ModsUpdater/VS_ModsUpdater.sh: 8: /home/container/VS_ModsUpdater: Permission denied
container@pterodactyl~ Server marked as offline...
[Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ----------
[Pterodactyl Daemon]: Exit code: 126
[Pterodactyl Daemon]: Out of memory: false
[Pterodactyl Daemon]: Aborting automatic restart, last crash occurred less than 60 seconds ago.

💬 LaerinokAuthor, Oct 20th 2023 at 11:40 AM

Kaofan

You must also change the '/Path_To_VS_ModsUpdater/VS_ModsUpdater'  with the path were you put VS_ModsUpdater.

Path_To_VS_ModsUpdater is the path to the directory where is VS_ModsUpdater.

 

But I don't know if a relative path is enough or if you must write the absolute path.

💬 Kaofan, Oct 20th 2023 at 11:27 AM

Laerinok

I don't know if I've done it right

imgur.com/a/fW1whyP

[Pterodactyl Daemon]: Finished pulling Docker container image
container@pterodactyl~ dotnet --version
7.0.402
:/home/container$ VS_ModsUpdater.sh && ./VintagestoryServer --dataPath ./data --port=${SERVER_PORT} --maxclients=${MAX_CLIENTS} ${OPTIONS}
/entrypoint.sh: line 20: VS_ModsUpdater.sh: command not found
container@pterodactyl~ Server marked as offline...
[Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ----------
[Pterodactyl Daemon]: Exit code: 127
[Pterodactyl Daemon]: Out of memory: false
[Pterodactyl Daemon]: Aborting automatic restart, last crash occurred less than 60 seconds ago.

 

Edit1:

I guess I'm really stupid?

[Pterodactyl Daemon]: Finished pulling Docker container image
container@pterodactyl~ dotnet --version
7.0.402
:/home/container$ ./VS_ModsUpdater/VS_ModsUpdater.sh && ./VintagestoryServer --dataPath ./data --port=${SERVER_PORT} --maxclients=${MAX_CLIENTS} ${OPTIONS}
./VS_ModsUpdater/VS_ModsUpdater.sh: 8: /Path_To_VS_ModsUpdater/VS_ModsUpdater: not found
container@pterodactyl~ Server marked as offline...
[Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ----------
[Pterodactyl Daemon]: Exit code: 127
[Pterodactyl Daemon]: Out of memory: false
[Pterodactyl Daemon]: Aborting automatic restart, last crash occurred less than 60 seconds ago.

💬 LaerinokAuthor, Oct 19th 2023 at 3:21 PM

EDIT : Erratum - I'd forgotten to put the executable file in the archive. Sorry.

Download the Source code archive (zip or tar.gz) and the VS_ModsUpdater file.

Extract the Source code archive and put the VS_ModsUpdater file in the directory.


I've made a new pre-release. Hope this could solve your problem : VS_ModsUpdater v1.2.0-pre2

This is the compiled version. You don't have to bother with Python. But you should run it in a different way :

  • Extract files (this doesn't change ^^)
  • Open and edit VS_ModsUpdater.sh : You must set the right directory for VS_ModsUpdater and your Mods. You can change the language if needed.
  • You need to make VS_ModsUpdater.sh executable.
  • Then you should be able to run with this command : VS_ModsUpdater.sh && ./VintagestoryServer --dataPath ./data --port=${SERVER_PORT} --maxclients=${MAX_CLIENTS} ${OPTIONS}
💬 LaerinokAuthor, Oct 19th 2023 at 1:53 PM

@Kaofan

Vintage Story no, but my script does. It is writen with Python.

Can you run a terminal ? or you only have acces to the pterodactyl's pannel ?

💬 Kaofan, Oct 19th 2023 at 10:47 AM

Laerinok

Let me tell you that no Vintage Story server uses the Python module

💬 Kaofan, Oct 19th 2023 at 10:45 AM

Laerinok

This is a personal Server that is on the Pterodactyl panel which this panel is used with a VPS

💬 LaerinokAuthor, Oct 19th 2023 at 9:50 AM

Kaofan

I think the problem is that some Python modules are not installed on the server. I guess it's a paid server, or is it a personal server ? I don't know if it's possible to install new Python modules on a paid server. I will look for a way to automatically install missing dependancies (I don't know how to do this at the moment), and it's without any guarantee.

💬 Kaofan, Oct 18th 2023 at 12:09 AM

Laerinok

I tried it and it doesn't help either

💬 LaerinokAuthor, Oct 10th 2023 at 6:15 AM

Kaofan

Not sure, but try to run with starting by python3 (or maybe python. Depends on your config)

python3 ./VS_ModsUpdater.py --language en_US --modspath "./Mods" --nopause true && ./VintagestoryServer --dataPath ./data --port=${SERVER_PORT} --maxclients=${MAX_CLIENTS} ${OPTIONS}

 

But it seems the module is not installed on your system. If it is so, I don't know how to do without admin privilege. Some modules are included by default in the Python library. Some other must be mannually installed. In this case you must own admin privileges. I guess it's not possible if you don't own the server. But I did not have many knowledges with Linux, so maybe other users can tell if it's the case.

💬 Kaofan, Oct 10th 2023 at 2:06 AM

Help!

:/home/container$ ./VS_ModsUpdater.py --language en_US --modspath "./Mods" --nopause true && ./VintagestoryServer --dataPath ./data --port=${SERVER_PORT} --maxclients=${MAX_CLIENTS} ${OPTIONS}
Traceback (most recent call last):
File "/home/container/./VS_ModsUpdater.py", line 31, in <module>
import requests
ModuleNotFoundError: No module named 'requests'

💬 LaerinokAuthor, Oct 9th 2023 at 7:05 PM

I made some changes in the script. Now you will be able to run it in command line and you should use it to run on dedicated servers. It's a pre-release so I don't yet upload here but you can get and try it by downloading it from my Git. pre-release of the script for VintageStoryServer

You can run the script with the following arguments:
VS_ModsUpdater.py [-h] [--modspath MODSPATH] [--language LANGUAGE] [--nopause {false,true}] [--exclusion EXCLUSION [EXCLUSION ...]]

options:
-h, --help show this help message and exit
--modspath MODSPATH Enter the mods directory (in quotes). Quotes are needed only if there is some space in the path-name.
--language LANGUAGE Set the language file (as it is named in the lang directory, without extension)
--nopause {false,true} Disable the pause at the end of the script. You NEED to set it to true if not the script prompts and wait your intervention.
--exclusion EXCLUSION [EXCLUSION ...] Write filenames of mods with extension (in quotes) you want to exclude (each mod separated by space). It's not really useful as you can set it later in the config.ini file.

Exemple of use :
VS_ModsUpdater.py --language en_US --modspath "/home/VintagestoryData/mods" --nopause true

You could write this kind of command before the command for running the server. It may be something like that:
VS_ModsUpdater.py --language en_US --modspath "YourModsFolderPath" --nopause true && ./YourVintagestoryServerPath/VintagestoryServer --dataPath ./YourModsFolderPath --port=XXXXX --maxclient=X

I don't have any dedicated server, so I only can guess how it will work. Vlammar (thanks to you) gave me many clues. The script runs, but you will need probably to do some tweak before to use it.

It's a python script, I guess it's already installed with Linux. You may need to install dependancies before.
I am working to a way to automatically install missing dependancies but it will be for later.

Don't hesitate to tell me what is working or not, but please be as precise as possible.

💬 LaerinokAuthor, Oct 4th 2023 at 4:29 PM

Vlammar

OK. Je vois mieux. Enfin je crois. Merci. J'ai vu que je pouvais faire passer au script des arguments en ligne de commande. Les seules éventuelles interventions humaines sont au premier lancement (la saisie du chemin dossier des mods et la création du config.ini) Et la pause finale. Donc si j'arrive à faire un truc du genre : VS_modupdater.py --ModPath --Language --ModsException et à supprimer la pause, ca correspondrait ?

💬 Kaofan, Oct 4th 2023 at 1:50 PM

Vlammar

And you can do it, because I don't know anything about bash or .py scripts

💬 Vlammar, Oct 4th 2023 at 12:54 PM

@Laerinok tu peux créer un bash qui lance d'abord le .py qui mets à jour les mods sans demander de validation puis qui lance le server (pour le bash c'est simple mais pour le script python je ne sais pas comment il marche exactement. Par exemple sur pterodactyl tu as ce genre de command que tu peux éditer

💬 LaerinokAuthor, Oct 4th 2023 at 6:54 AM

Vlammar

Salut. Qu'entends-tu exactement par "lancer le script avec une option derrière" ? Je suis un utilisateur de Linux très occasionnel, et débutant en Python. Donc très probalement en manque de pas mal de notions ;)

💬 Vlammar, Oct 3rd 2023 at 10:03 PM

@kaofan On pterodactyl you execute a startup command. If you add the python script into your File Manager folder it is possible to execute the python script then the server start script. @Laerinok Is it possible to run your script only with command line with something like python3 VS_modupdater.py -SomeOptionToForceUpdate ?

💬 LaerinokAuthor, Sep 28th 2023 at 6:39 AM

Thanks for your feed back. Glad to know it is useful :)

💬 Chumber, Sep 27th 2023 at 9:17 PM

Thank you for this, makes my life so much easier.

 

Working perfectly on Ubuntu 22.04 LTS

💬 Yskar, Sep 15th 2023 at 11:25 PM

Laerinok, thanks bro, the VS_ModsUpdater.py i got your github just  worked on Arch Linux when i installed the prerequisites using "sudo pacman -S python-rich python-semver", it look like the compiled binary didn't works outside Debian-based distros but don't fret, everything is working awesomelly using just the script or using steam proton to run the windows version, thanks A LOT.

PS: If you want to automate this kind of Linux distribution detection you can get the distro name variable reading the files "/etc/os-release" and/or "/etc/os-release".

💬 LaerinokAuthor, Sep 15th 2023 at 7:14 AM

Yskar

I answer your message here as it's for linux ;)

It seems an issue with a SSL certificat ? I don't really know how to deal with. I will look for this but my knowlegdes in linux are quite low.

"NameError: name 'err_lang' is not defined" It seems it didn't find the language file. It happens when the script is launched but the lang directory is not beside.

As I said, you can find the .py in the source tab. ;)

You can pm me on discord : username: laerinok (display name : Jay)

💬 Yskar, Sep 15th 2023 at 6:37 AM

Thanks a LOT, Laerinok, i will test right now! o/ 👍

💬 LaerinokAuthor, Sep 11th 2023 at 4:56 AM

Well I have no idea how Pterodactyl works. I'll see if I can do something.

💬 Kaofan, Sep 11th 2023 at 12:41 AM

Would you make a Pterodactyl version?

💬 LaerinokAuthor, Sep 10th 2023 at 5:36 PM

Yeah. Good news ! 😃

Thanks

💬 Teslov, Sep 10th 2023 at 4:40 PM

I love you.

Works perfectly on Ubuntu 23.04

(edit comment delete)