jeffthibault/python-nostr

Publish to relays fails with TypeError (python3.11.4, nostr 0.0.2)

escapedcat opened this issue · 5 comments

Trying the current "Publish to relays" example I get

event = Event("Hello Nostr")
^^^^^^^^^^^^^^^^^^^^
TypeError: Event.__init__() missing 1 required positional argument: 'content'

Not sure what's missing.

Using

  • nostr 0.0.2
  • Python 3.11

The old example with version 0.0.1 and Pyhton 3.10.9 still works. Rolling back for now.

bbgx commented

If I remember correctly, you need to use like this Event(publickey="", content="")

Hm, yes, with 0.0.1 it works like that.

The README example was changed here:
69ff17b#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R53
Trying the current example doesn't work for me.

Stosso commented

I have the same problem...

the readme is still incorrect... "publish to relays" section

After the current "Python 3.10.9 / nostr 0.0.1"-setup started to fail as well I switched to Calles fork as well and everything works fine again.