SnarpleDev / Snazzle

A better frontend for Scratch, built by the community, for the community
https://snarpledev.github.io/Snazzle/
BSD 3-Clause "New" or "Revised" License
14 stars 6 forks source link

SPS release may not be complete #86

Open davidtheplatform opened 4 months ago

davidtheplatform commented 4 months ago

I'm trying to install snazzle through the SPS release, and I think some steps are missing.

There may be more, these are just the ones I can find right now

redstone-dev commented 4 months ago

I knew something like this would happen... :facepalm:

A true It Works On My Machine™️ moment.

1) The venv being broken doesn't surprise me all that much, I've had weird problems with virtual environments in the past. I'm not too sure what to do about it though.

2) The automatic dependency installer should do that for you, so that's strange. Check the logs directory where you installed SPS.

3) Are you sure you're following the instructions listed under the release for SPS v2? It talks about how to set it up completely.

Once I know what's happening, I'll fix these for SPS v3 👍🏻

davidtheplatform commented 4 months ago

Which directory should SNAZZLE_PATH point to? Right now I have it set to the directory with app.py

davidtheplatform commented 4 months ago

Also is the systemd section required?

redstone-dev commented 4 months ago

Which directory should SNAZZLE_PATH point to? Right now I have it set to the directory with app.py

That's what it should be set to. Ex. if that file's path is /home/user/Snazzle/app.py, SNAZZLE_PATH should be /home/user/Snazzle. You should NOT use ./, ../ or ~ in the path because it should be an absolute path and not depend on the current user.

Also is the systemd section required?

No, but it should make running Snazzle 24/7 a bit easier. Though it might be a bit annoying to use the resource monitor page because I don't know how you can get stdin in a systemd service :P

I just realized that /etc/snazzle should probably only be accessed if SPS is running as a daemon/systemd service, so that will also be in v3.

davidtheplatform commented 4 months ago

I’m going to start over and record my steps:

  1. wget https://github.com/SnarpleDev/Snazzle/releases/download/server-v2/Snazzle-Prod-Server-v2.tar.gz
  2. tar -xf snazzle.whatever
  3. cd snazzle-server/Snazzle
  4. sudo apt install libev-dev
  5. In .env change the username to the correct one (I extracted the tar to /home/myusername)
  6. python3 app.py
  7. No module named dotenv
redstone-dev commented 4 months ago
  1. No module named dotenv

You didn't source .venv/bin/activate, do that and then run python3 app.py.

davidtheplatform commented 4 months ago
  1. No module named dotenv

You didn't source .venv/bin/activate, do that and then run python3 app.py.

That doesn’t change anything, also it’s not in the instructions

davidtheplatform commented 4 months ago

The problem is that virtual envs shouldn’t be copied because they use absolute paths that are made when the venv is created.

The intended way of distributing something like this is to package the source code without packages, and include a requirements.txt that the end user installs themselves. You can make the requirements.txt with ‘pip freeze’

redstone-dev commented 4 months ago

The problem is that virtual envs shouldn’t be copied because they use absolute paths that are made when the venv is created.

The intended way of distributing something like this is to package the source code without packages, and include a requirements.txt that the end user installs themselves. You can make the requirements.txt with ‘pip freeze’

Oh right, I forgot about that. I'll fix it in the morning

dynamixbot commented 4 months ago

The problem is that virtual envs shouldn’t be copied because they use absolute paths that are made when the venv is created. The intended way of distributing something like this is to package the source code without packages, and include a requirements.txt that the end user installs themselves. You can make the requirements.txt with ‘pip freeze’

Oh right, I forgot about that. I'll fix it in the morning

♪ Gotta add some documentation ♪

redstone-dev commented 4 months ago

I said I'd fix it in the morning but it took me 5 days to fix it LMAO

Not sure it's 100% fixed though. Please verify v3 and tell me if there are still problems

davidtheplatform commented 4 months ago

The dotenv path in install_reqs.py is hardcoded to /etc/snazzle/.env when it should probably be ./.env by default Edit: same thing in dazzle.py

davidtheplatform commented 4 months ago

Got it working: https://snazzle.davidtheplatform.eu.org/

redstone-dev commented 4 months ago

The dotenv path in install_reqs.py is hardcoded to /etc/snazzle/.env when it should probably be ./.env by default Edit: same thing in dazzle.py

Will fix in v4

redstone-dev commented 1 month ago

The dotenv path in install_reqs.py is hardcoded to /etc/snazzle/.env when it should probably be ./.env by default Edit: same thing in dazzle.py

Will fix in v4

v4 never came 😔