Closed ineffyble closed 1 year ago
Whoops, hadn't tried running a clean install of the code in a while. Added a check now!
Completely missed that you had already made a pull request, still a little green on github.
Hey, I have just reinstalled everything and the problem still occurs:
`root@crossposter:~/myapps/crossposter/bluesky-crossposter# python crosspost.py 01/10/2023 02:20:02: Gathering posts
01/10/2023 02:20:02: Posted to twitter
01/10/2023 02:20:04: Posted to mastodon
01/10/2023 02:20:04: Adding to database: {"skeet": "xxx", "ids": {"twitterId": "xxx", "mastodonId": xxx}, "failed": {"twitter": 0, "mastodon": 0}}
Traceback (most recent call last):
File "/root/myapps/crossposter/bluesky-crossposter/crosspost.py", line 519, in
You seem to have an incorrectly given basePath in paths.py, I'm guessing it's set to just "/" instead of the actual path to the project. Right now it is trying to write to the file database.json in the folder "/db", which I am assuming does not exist. So you should update the basePath or create the folder if that is where you want it saved.
Okay, right. I have now set the path. But meanwhile I get another error xD
The path is set in the paths.py and the folder "logs" also exists
python3 crosspost.py 02/10/2023 17:20:04: Gathering posts
Traceback (most recent call last):
File "/root/myapps/crossposter/bluesky-crossposter/crosspost.py", line 518, in
But thanks so far @Linus2punkt0 for your help!
From what I can see the app is running in "/root/myapps/crossposter/bluesky-crossposter/", but the path specified for logs is "/myapps/crossposter/bluesky-crossposter/logs/", so it can't find the folder.
Right, my mistake. I have now adjusted it and now get the next error. Sorry if I am perhaps a little unknowing 🙈
root@crossposter:~/myapps/crossposter/bluesky-crossposter# python3 crosspost.py
Traceback (most recent call last):
File "/root/myapps/crossposter/bluesky-crossposter/crosspost.py", line 517, in
I'm not entirely sure why you are getting that error but I believe it's because a database-file has been created but is empty. I wrote a small fix that should avoid this error, just download the new version of crosspost.py and try running it again.
I had a look at it myself and was able to fix it here in a quick fork. @Linus2punkt0 I was going to put a PR in but it seems you have tried to already address it.
There's a check in
jsonRead()
for if the database file actually exists, but none inisInDB()
. This means that when I try to run, it crossposts, then isInDB() throws, nothing is written, and it repeats on next run.On a less substantial note it also failed initially because my
logs
andimages
dirs didn't exist, but that was just a case ofmkdir
.