Comments (12)
there is also now a new beta version which may or may not help.
from ephemetoot.
Nice work!
PRs are definitely welcome (see contributing in the docs folder or link from README). I'd prefer not to create a directory if it's not there, because that might be unexpected behaviour for users, but a better error message is definitely a good idea.I moved a bunch of code around in the last couple of weeks while I was adding tests, so actually the error messages were all messed up anyway.
Re the permissions error:
TBH I'm more careless than you and just always gave ephemetoot all read/write permissions. Obviously this is something that should be more explicit in the docs though, and I should have really tested already.
I'll do some thorough checking today to check the minimum requirements but looking at it, you probably need:
Read
- accounts (I think)
- favourites
- statuses
Write
- statuses
You might need write permissions for favourites when deleting them if the API wants to unfavourite before deleting.
from ephemetoot.
Apologies @trev-dev I prematurely updated the docs: up until last week ephemetoot
was not in pypi and install was via git.
The first version uploaded to pipy (v2.6.1) is borked because I didn't know what I was doing.
Right now you can resolve the error by uninstalling and then installing the alpha version 3 but you have to pin the exact version because it's a pre-release:
pip uninstall ephemetoot
pip install ephemetoot==3.0.0-alpha.0
I expect to have a 'proper' v3.0.0 in pypi by the end of this weekend. The current docs should work for 3.0.0a0.
from ephemetoot.
Thank you!
from ephemetoot.
LOL, the alpha version is throwing a 50x error when trying to connect to my instance. I'll wait for the release.
from ephemetoot.
@trev-dev that's...unexpected. Do you mind posting your config (but not your real access token, obvs)? This is either your config file being not quite right, your server being weird, or a new and exciting bug.
from ephemetoot.
It tried the beta and it's the same result. Here's my config :D Running ephemetoot --test
-
access_token: redacted
username: trevdev
base_url: mastodon.technology
days_to_keep: 182
keep_pinned: true
hashtags_to_keep:
- #python
- #javascript
- #vuejs
- #react
- #teaching
- #scratch
- #pygame
- #privacy
- #security
- #linux
- #foss
- #arch
- #debian
- #opensource
- #reactjs
- #webdev
- #pelican
- #100daysofcode
- #diaspora
- #mastodon
- #django
- #emacs
- #vim
- #neovim
archive: ~/Downloads
(ephemetoot) ā ephemetoot ephemetoot --test
============= EPHEMETOOT v3.0.0b0 ================
Running at Sun 06 Sep 2020 22:46:17 +0000
================================================
This is a test run...
Fetching account details for @[email protected]
š Server has returned an error (5xx)
from ephemetoot.
Ah, I can possibly see a problem but the error message is extremely unhelpful for you to spot it!
Hashtags should not include the hash (this is to do with how the Mastodon API works). So your tag list should look like:
hashtags_to_keep:
- python
- javascript
- vuejs
- react
- teaching
- scratch
- pygame
- privacy
- security
- linux
- foss
- arch
- debian
- opensource
- reactjs
- webdev
- pelican
- 100daysofcode
- diaspora
- mastodon
- django
- emacs
- vim
- neovim
Do you mind checking if that fixes it? I'm not entirely convinced it will, but it's a problem anyway.
I'm looking into better error checking for --init
to catch things like this.
Also I'm going to create a --verbose
flag ( #51 ) to help troubleshoot stuff like this because there's probably something useful in the actual Exception message, which we can't currently see.
from ephemetoot.
Verbose is a great idea!
I'm still getting the 50X error after removing the pound symbols. I have a fork handy maybe I can help.
from ephemetoot.
I stuck a stack trace using pdb to see what the error actually is when we hit line
ephemetoot/ephemetoot/ephemetoot.py
Line 479 in 0cf95a4
The error is a 403 error. I only gave ephemetoot read/write access to posts
, what sort of permission does ephemetoot need at a bare minimum?
============= EPHEMETOOT v3.0.0b0 ================
Running at Mon 07 Sep 2020 03:01:19 +0000
================================================
This is a test run...
Fetching account details for @[email protected]
> /home/trev/.local/share/virtualenvs/ephemetoot-7ki6mRLC/lib/python3.8/site-packages/ephemetoot/ephemetoot.py(481)check_toots()
-> print("\nš Server has returned an error (5xx)\n")
(Pdb) e
MastodonAPIError('Mastodon API returned error', 403, 'Forbidden', 'This action is outside the authorized scopes')
(Pdb)
from ephemetoot.
So giving ephemetoot access to everything fixes this problem. Also, if you have an archive directory that ephemetoot cannot find, it doesn't attempt to create it, it just fails ungracefully by yelling ERROR: 2
. No real technical problems here, just a need for better documentation and more graceful error messaging š Are PRs welcome?
from ephemetoot.
FYI it looks like the required permissions are:
read:accounts
read:statuses
write:conversations
write:statuses
I'm adding that to the docs.
from ephemetoot.
Related Issues (20)
- Handling/retry of 500 errors? HOT 7
- Do you have a Kofi/PayPal/Venmo? HOT 2
- BUG - v2.6 still shows v2.5 HOT 3
- use format checking in config file creation
- move test run completion message to after cleanup complete message
- verbose mode for easier troubleshooting
- BUG - upgrade instructions in --version are wrong
- Quieter mode? HOT 1
- add tests for -qq and -qqq
- add boosts only option HOT 6
- Include tests on pypi distribution HOT 2
- fix typo in docs HOT 2
- ERROR: unsupported operand type(s) for +=: 'NoneType' and 'int' HOT 11
- clearer config information
- Mention cleantoots in the docs HOT 2
- Optionally include media attachments in archives HOT 1
- add tests for media archiving
- Remove favorites HOT 1
- Not deleting replies / mentions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ephemetoot.