lona: Example script error when clicking button

Running the example single-script file i get this error when clicking the buttton:

LonaWorker_1 ERROR    17:57:34.559156 lona.input_events runtime #15856828000000: event #57: exception  occurred
  Traceback (most recent call last):
    File "C:\Python39\lib\site-packages\lona\view_runtime.py", line 661, in handle_input_event
      window_id=self.connections[connection][0],
  KeyError: <lona.connection.Connection object at 0x0000024BE2B65700>

restarting without any changes means this error doesn’t occur any more, but the button does not change

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 28 (24 by maintainers)

Most upvoted comments

@laundmo, @korantu, @themutt: I released 1.4. Thanks a lot for your work! Message me if you guys want some stickers 😃 https://lona-web.org/stickers.html

Don’t be shy, i received a new delivery of 2000 pieces a few minutes ago 😃

@laundmo: I researched a little bit and brainstormed with a co-worker of mine. I will implement a global atomic counter, similar to your approach, but with locking to avoid race conditions.

@themutt, @laundmo: Can you test my patch when its done, before i make a release?

@fscherf I have access to a windows machine at the office, can also test.

@fscherf of course i will test, and yeah my approach was obviously quick-n-dirty. I haven’t looked too much into deploying lona or for example the lona django integration which could casue issues. Using something like redis in deployment might be unavoidable to handle ids across multiple workers