Comments (2)
I've released version 0.1.10 which pins Pydantic to version 1.10.11 and thus solves the issue.
@SergeyPriem Thanks for reporting this
@martinmarroyo I really appreciate your help on this. As I wrote above, I decided to pin the Pydantic version for now.
The code you wrote seems to address the demands of Pydantic 2, but, as you noted, problems remain (an exception coming from the ASGI application).
I believe that this is a FastAPI issue. Pydantic v2 support was added in the latest version of FastAPI (0.100) and there appears to be some growing pains judging by discussions / issues on their repository. Thankfully, FastAPI decided to keep backwards compatibility with Pydantic v1 which allows to use the latest FastAPI while staying on Pydantic v1.
from streamsync.
Update
After some more research, I found that my issue was primarily caused by the new Pydantic update to version 2.0.2 last week. I fixed it temporarily by downgrading to version 1.10.11 (pip install pydantic==1.10.11
). That should get things working as expected for now until a more permanent fix is put in place.
I ran into the same issue when installing streamsync 0.1.9 and running streamsync hello
on Python 3.11. Here is the relevant documentation from Pydantic: https://docs.pydantic.dev/dev-v2/usage/errors/#typed-dict-version. This is breaking the streamsync
command in general. I modified the imports in ss_types.py
to check for the python version and import TypedDict based on that. Here is what I added to ss_types.py
:
import sys
from typing import Any, Dict, List, Literal, Optional, Protocol, Tuple
# Python versions earlier than 3.12 need typing_extensions.TypedDict
if sys.version_info.major <= 3 and sys.version_info.minor < 12:
from typing_extensions import TypedDict
else:
from typing import TypedDict
from pydantic import BaseModel
It got the streamsync
command to work, but now I'm getting validation errors when running streamsync hello
.
I'd like to help with troubleshooting this further, but am admittedly a little lost with respect to collaboration on this project and how to build to test my changes. @ramedina86 I'm happy to help, please let me know if that's something you would like.
from streamsync.
Related Issues (20)
- Python 3.12 tests issuing DeprecationWarning related to multiprocessing HOT 2
- use poetry instead of setup tools as package manager
- github action enforce PR continuous integration rules
- Changing font-family for entire app not intuitive
- Unable to build docker image with Dockerfile from docs HOT 2
- Event context not working for repeater objects where the repeater object is specified using square brackets "[ ]" HOT 2
- Serving large numbers of images
- pagination component documentation is missing on the official documentation
- Add checkbox column to dataframe that is interactive HOT 1
- Use Pydantic for automating most event payload sanitisers HOT 1
- Question: How to link message component with a state element HOT 1
- How to convert <streamsync.core.BytesWrapper object at 0x1065ca890> to base64
- Create separate test apps for backend and manual frontend testing HOT 1
- declare optional schema on streamsync state
- Implement pylint HOT 6
- Update Repeater docs to explain use of dynamic accessors
- add a tooltip option on icon, button, ... component
- File input component doesn't show the name of the uploaded files HOT 1
- Embed Iframe into Streamsync HOT 6
- on edit mode when I am on a page generated in low code and the code is run again, the page become blank HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from streamsync.