Comments (7)
Hi thanks for raising this issue. This is due to Python version incompatibility. The style of type hints used in the code is only supported by python >= 3.9
. I will revert to using the older and the more backwards compatible typing hint system and create a new release that should solve your issue on Python 3.8.
from api-analytics.
Upgrading your api-analytics
package to 1.1.3
should solve this issue now. Thanks
from api-analytics.
Thanks for the quick response Tom.
Not sure if other users of this service have reported this or not, but add_middleware() function does not take 2 positional arguments (latest version of fastapi (0.95.1) as well as 0.92.1) anymore. So, I am struggling with the following line from fastapi-analytics.
app.add_middleware(Analytics, <API-KEY>) # Add middleware
Similar call to add_middleware for CORS support uses the following approach and it works:
app.add_middleware(
CORSMiddleware,
allow_origins=['*'],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
from api-analytics.
Oh sorry about that, I think the docs are slightly wrong there. The API key should be passed as a named argument. I'll fix that.
So it should be:
app.add_middleware(Analytics, api_key=<API-KEY>)
from api-analytics.
Thanks @tom-draper . That took care of the exception - I see that you already updated the documentation!
Made a few API calls (about 10 calls across 3 different API end-points on this API), but it doesn't show in the dashboard. Is there a long lag? Or is there some other issue? The documentation suggests making this middleware call and then directly access the dashboard. Anything that I am missing?
from api-analytics.
Apologies again! Should be fixed now. Lots of backend upgrades have been made over the past week so there are still a few bugs to iron out. Thanks a lot
from api-analytics.
Works now. Thanks
from api-analytics.
Related Issues (20)
- Missing Requests on Dashboard HOT 3
- Error opening Dashboard HOT 1
- Backend down? HOT 1
- Path for Rocket Analytics should be the route name. HOT 14
- Developer Docs HOT 1
- Doesn't work with flask HOT 2
- License and project vision HOT 1
- Backend down? HOT 1
- KeyError: 'user-agent' HOT 1
- KeyError: 'HTTP_USER_AGENT' HOT 1
- maximum response time HOT 5
- Dashboard is not loading the data HOT 2
- `api/data` returns an empty list. HOT 1
- Long loading time HOT 1
- axum analytics: Service not implemented
- All time users changed to 0 even though it had over 100k users before. HOT 1
- No requests logged for a long time HOT 13
- The dashborad loading circle keeps for about 10 minutes HOT 1
- Issue working with API ANALYTICS + LangServe HOT 2
- MODULE_NOT_FOUND /node_modules/node/bin/node
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 api-analytics.