UnboundLocalError: local variable 'magic_words' referenced before assignment #18
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
So I can't tell if this isn't some kind of user error, but I don't have a Python IDE set up or anything, nor am I really a developer, so I can't even guess at what's happening.
I mean, I know what's happening - the variable
magic_words
was referenced before it was assigned - but I'm more curious as to why it happened. The documentation on magic words is minimal, and this happens regardless of whether I'm using one or not.(I did have other errors, but most of those seem to have subsided once I installed depedencies and used Poetry - that being said, I think pycairo has external dependencies on cairo that aren't Python-related and can't be installed with pip, so documenting any dependencies would help. I tried both the release version off pip and cloning from this repo.) From a simple
poetry run etherpump pull
:It could possibly be odd issues with my Python installation (it's 3.8 and has always been oddly temperamental), so I'll see if I can't test it out elsewhere temporarily and see if the problem persists. Otherwise, my theory is that magic words are hardcoded to varia somehow or stuck in the JSON settings or something, so when I run it without that information it chokes. (I tried adding
magic_words
to the JSON settings file, but it didn't take.)Thanks for raising this @queenfiona! I have taken a look and this does indeed seem to be a bug on our part in the source. I was able to reproduce it and will get a release out with a fix soon.
(I tested with this diff just to make sure, you could use this as a work-around for now or alternatively, pass
--magicwords
, I think that should also get you past this).hey @queenfiona, I've published a new version of
etherpump
with this hopefully fixed! You canpip install -U etherpump
or do agit pull
from your source check-out and that should work out. Let me know!Also, please feel free to raise further tickets on bugs/docs/whatever, it is really valuable to get feedback on using this tool outside of varia. Also, would be cool to see what you publish! 🖤
So I wanted to confirm that this is working as intended, as far as I can tell. It's pulling things, indexing them, reading the magic words, etcetera. However, right now...
it feels a lot like this is made very fit-to-purpose for Constant and Varia. While the tools to make something more suited to another use case appear to be in place, currently it's very fuzzy to me how to get there, and the existing files reference CSS files that aren't copied into place.
Ideally, I'd want a page very similar in strucutre to https://etherpump.vvvvvvaria.org/, which is what got me into wanting to use the tool in the first place, but I'm not sure how that page is created using etherpump. I assume it's a particular custom template and set of commands that produces that page, so if I had some idea of the steps you (or presumably your cron script) take to do so, I could probably muddle through it despite not really being much of a programmer.
I'll also have to see how the tool plays with plugins, since I'm using it for more than just raw text. But it should be fine if Etherpump provides proper HTML; I'll mention if there's any issues on that front.
Hey @queenfiona thanks for reporting in, happy to hear things are working.
Totally get you on the lack of documentation/context. Etherpump is actually a very generic tool and that also makes it a bit overwhelming - there are so many options! We're definitely lacking some tutorial stuff. I'm taking notes in #18.
In the meantime, here is some code (script, stylesheet, etc.) which was used to make the etherpump Varia page https://git.vvvvvvaria.org/varia/etherpump-live (I am not sure if this is super up-to-date but it should get you started!).
re: plugins, please raise an issue on what you run into! I was experimenting with storing also comments via the comments plugin but didn't get far (see #7). It is all totally possible though and would be interesting to support.