Closed Skutela32 closed 3 months ago
I'm a bit confused here. The assets aren't missing. They're in the src folder currently, as I'm running the program directly from the src folder when I run it. Maybe if you're running it with the root folder as the working folder, it's throwing errors for missing assets? Try running it with the src folder as your working folder, and there should be no missing assets error.
(appreciate the interest in the project, though! I'll be coming back to more regular work on it soon, hopefully)
Yea that's what I thought but it was being odd. Spent ages debugging to realise it was erroring and saying it couldn't find splash.png inside IntelliCaster/assets/splash.png So I moved it from src to there and it worked. I'm my pull request I left the original ones in src just added additional ones into the root to fix if anyone else sees this issue.
Are you using VSCode? If so, you may want to create/adjust the launch.json
to include "cwd": "${workspaceFolder}/src"
to make sure VSCode works from the correct folder. Here's my launch.json
for this repo, which also includes a pointer to the main.py
file so I can run the program no matter what script I currently have in front of me:
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Main File",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/src/main.py",
"cwd": "${workspaceFolder}/src",
"console": "integratedTerminal",
"justMyCode": true
}
]
}
Ahh yes running it like that works. I had tried in VS before but had the same error. I was previously running it from CMD using python and/or directly from the .py file.
Yeah, VSCode is a bit strange with Python. You'd expect the default working directory to be the one the file is in, but by default, it sets it as the root folder. It's annoying, but at least they provide a way to fix it with the launch parameters.
I'm going to close this PR, but please feel free to contribute more in the future. :)
Description
Added additional assets files to the root aswell as kept original src ones.
Fixes # (issue)
Type of change
Testing
Run original file - error missing splash.png
These files - boots straight up