pdinklag / MinecraftStats

A Minecraft player statistics browser for the web - supports 1.13 and later!
https://discord.gg/brH5PGG8By
Other
227 stars 53 forks source link

server.path not configured, please edit config #124

Closed kellekerell closed 3 years ago

kellekerell commented 3 years ago

Im running into this issue when typing python3 update.py config. In the config.json Ive set everything up { "configVersion": 1, "database": "data", "server": { "path": "/home/amp/.ampdata/instances/Spieleaustausch/Minecraft", "customName": false, "worldName": "world" }, The rest is as default... I don't know why it just won't work.

kellekerell commented 3 years ago

Also, there is no data folder in the main folder of the plugin... Guess that that one is only created after everything was setup successfully which it apparently isnt and I dont know why.

pdinklag commented 3 years ago

when typing python3 update.py config.

Do you literally type python3 update.py config? You do need to state the whole filename of the configuration, which is config.json, not just config.

If that isn't the problem, are there any more messages printed, any error messages? Maybe paste the whole config JSON file in here so I can try and reproduce.

Also, there is no data folder in the main folder of the plugin... Guess that that one is only created after everything was setup successfully

Exactly, that folder won't exist before the initial update succeeded.

kellekerell commented 3 years ago

Thanks for the quick reply! Thought config was just fine.

Would this work just fine as a cronjob or are there any downsides? * * * * * cd /var/www/html/minecraft && python3 update.py config.json && cd It seems to work but I dont know whether its clever to return back to the main directory in the end.

pdinklag commented 3 years ago

Thanks for the quick reply! Thought config was just fine. Good to know!

Would this work just fine as a cronjob or are there any downsides? * * * * * cd /var/www/html/minecraft && python3 update.py config.json && cd

That's the common way of doing it I'd say, although maybe reconsider whether you really need an update every minute. On my own servers, I run it every 10 minutes. But that's totally your call!

I dont know whether its clever to return back to the main directory in the end.

I don't see any reason to do it, looks like you can just as well leave that out.

kellekerell commented 3 years ago

Changed it to */30 for the first parameter so I get an update each half an hour, thank you for your help! Much appreciated!