Comments (3)
Hey there, @MEclipse1! I'm here to assist you with any bugs, questions, or contributions you have. Let's tackle this together! 🤖
To resolve the AttributeError: 'Template' object has no attribute 'strip'
issue, you need to ensure that the stripped
attribute is accessed correctly. The stripped
method should be accessed as an attribute, not as a method.
Here is the corrected code snippet:
rendered_query = sql_template_processor.process_template(
parsed_query.stripped, **execution_context.template_params
)
Additionally, ensure that the parsed_query
object is correctly instantiated and that the stripped
attribute is properly defined within the ParsedQuery
class. This change should resolve the AttributeError
you are encountering.
Refer to the superset/models/sql_lab.py
file for more context on how SQL parsing and template processing are handled in Apache Superset. The process_template
method in the BaseTemplateProcessor
class is responsible for processing SQL templates, and it uses the Jinja environment to render the templates. Make sure your parsed_query
object and its attributes are compatible with this method [1][2][3][4].
To continue talking to Dosu, mention @dosu.
from superset.
It would help if you followed the bug report template and included the version of Superset you're using, etc.
This looks like a duplicate of #28145, what do you think?
from superset.
Related Issues (20)
- Advanced Period filter bug HOT 2
- Switching languages doesn't take effect on some menu elements if BABEL_DEFAULT_LOCALE is not "en" HOT 11
- ENABLE_JAVASCRIPT_CONTROLS use HOT 2
- [SIP-144] Proposal to Integrate VisActor Visualization Plugin into Superset HOT 2
- Dashboard Color Scheme keeps changing every refresh HOT 4
- Bug: fetchGuestToken function is not called after internet is disconnected and error is encountered during embedded report access HOT 3
- The in-memory storage for tracking rate limits HOT 14
- Filtered values not appearing/not working after selected from dropdown Post Migration to Latest SS Version HOT 6
- Proxy is unable to function properly HOT 8
- Importing example dataset failes because of database constraint HOT 3
- DynamoDB Chart Failure HOT 1
- Unable to create/see datasets HOT 1
- [4.1.0rc1] Building Docker image from sources fails HOT 3
- `Error: Referenced columns not available in DataFrame` in Mixed Charts when one query has only nulls HOT 1
- Inconsistencies in the handling of misspelled URLs HOT 2
- Embedded view shows only [Error: column "string" does not exist] HOT 2
- bug when updating chart /api/v1/chart/{pk} HOT 2
- Missing prefix in URLs of scripts and CSS files when STATIC_ASSETS_PREFIX config is set HOT 2
- Set Specific Time for Dashboard Refresh HOT 7
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.