Closed milochen0418 closed 1 year ago
For the clock project, you should clean all and rebuild it again. So that the example can be tested well. Or the wrong cached .pyc with old code is in it.
rm -rf .web
rm -rf __pycache__
pc init
pc run
In pynecone 0.1.20
async def process
function use
handler = getattr(substate, name)
In pynecone 0.1.21
async def process
function use
handler = substate.event_handlers[name] # type: ignore
some important code change. it look like 0.1.21 pynecone think the tick way is related to some Unexpected event type.
But After tracing the code, I still have no idea how to understand the part of this code
substate.event_handlers[name]
Same error with the clock app
Yes ~ same error with the clock app.
The current .pyc pycache/ is built by pynecone==0.1.20. If we need to reproduce the bug, we need clean the .web and the pycache/ in the project first and build it by pynecone==0.1.21.
If we push the byte codes (e.g. files in pycache) in the git server, We may miss the opportunity to test and rebuild completely. That's another reason why to prevent all pycache folders and all .pyc, .pyo, .pyd files from being uploaded. https://github.com/pynecone-io/pynecone/pull/718
The bug have solved in new version of pynecone 0.1.24 (PyPI)
Python Version: 3.11 Mac OS NodeJS Version: 12.22.12
tick is work on pynecone==0.1.20 but not on pynecone==0.1.21 because backend part has some issue.
For the backend part, snakegame and clock example cannot work for pynecone==0.1.21 But if we use pynecone==0.1.21 to build frontend, it can work with the backend with pynecone==0.1.20