Comments (1)
The error you're encountering with the GuestUser
object and the Dashboard API in Superset seems to stem from an issue where the GuestUser
is expected to behave like a SQLAlchemy model instance but doesn't meet these expectations. This is likely due to the GuestUser
object, which is designed for guest authentication, not being properly integrated with SQLAlchemy for operations that require database interaction.
To address this issue, consider the following steps:
-
Review the Authentication Flow: Ensure the process that handles guest tokens and creates
GuestUser
objects is correctly implemented, especially in how these objects are used in database operations. -
Adjust Middleware or Decorators: If there's middleware or decorators involved in user handling based on tokens, make sure they correctly manage guest tokens to avoid database operations expecting a fully-fledged user model.
-
Custom Handling for
GuestUser
: Implement custom handling in parts of your application whereGuestUser
objects might lead to issues, ensuring operations that expect database model attributes like_sa_instance_state
are properly managed. -
Check for Similar Issues: A similar issue was noted and resolved in a past version of Superset. Although you're using version 4.0.1, and the issue was noted to be resolved by upgrading to version 3.0.1, it's worth checking the Superset GitHub issues for any related discussions or fixes that might be applicable to your version.
This approach focuses on ensuring that GuestUser
objects are handled appropriately within the context of your application's authentication flow and database interactions. If the issue persists, reviewing the implementation of GuestUser
and its interaction with SQLAlchemy might provide further insights.
Details
Sources
- 500 'Fatal error' When Creating Dashboard Through Public API
- superset/commands/dashboard/create.py
- superset/security/guest_token.py
- superset/security/manager.py
- tests/integration_tests/security/guest_token_security_tests.py
- superset/security/api.py
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
To continue the conversation, mention @dosu.
from superset.
Related Issues (20)
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 superset.