magicalraccoon / tootstream

A command line interface for interacting with Mastodon instances
MIT License
259 stars 32 forks source link

Streaming fails with 'urls' / "local variable 'handle' referenced before assignment" error #191

Closed keithzg closed 6 years ago

keithzg commented 6 years ago

Tested with the current stable version via pip, and with the current git master and release/0.3.6 tag. Everything else seems to work, but attempting to stream anything fails as follows:

Tootstream version: 0.3.6
You are connected to https://mastodon.club
Enter a command. Use 'help' for a list of commands.

[@keithzg (default)]: stream local
Initializing stream...
Something went wrong: 'urls'
local variable 'handle' referenced before assignment

I'm running *buntu 18.04 (specifically Kubuntu, not that that should matter!) on both machines that I have tried this on. I'm quite willing to try anything that could be helpful for diagnosing this :)

craigmaloney commented 6 years ago

It looks like mastodon.club is using a really old version of the Mastodon software. The reason this isn't working is because there's a missing 'urls' piece which is part of the instance variable. This means that streaming isn't going to work with this version of tootstream / Mastodon.py.

Recommend upgrading mastodon.club if possible. I'll add something in the code to make the error more explicit.

Thanks!

craigmaloney commented 6 years ago

Addressed in https://github.com/magicalraccoon/tootstream/commit/d1c42ed6ab9ced52d68b325e2aad0cac1461ff36

keithzg commented 6 years ago

Aha, fair enough. I believe the admin's plan is to migrate to Pleroma as the backend, so that pending project is presumably what's left the current install lingering on an older version. Thank you for looking into it!