You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "marlomorales (via GitHub)" <gi...@apache.org> on 2023/02/02 03:37:02 UTC

[GitHub] [superset] marlomorales opened a new issue, #22949: 400 Syntax error: Unexpected ")" at [4:8]

marlomorales opened a new issue, #22949:
URL: https://github.com/apache/superset/issues/22949

   I keep on getting `400 Syntax error: Unexpected ")" at [4:8]` on an embedded dashboard whenever a superset user is not signed in. But when a superset user is signed in, that's when I successfully see the embedded dashboard.
    
   
   #### How to reproduce the bug
   
   1. Open a new Google Chrome Incognito window
   2. Go to the page with embedded Superset dashboard 
   3. See error via Screenshots section
   
   ### Expected results
   
   To see the embedded dashboard even when a superset user is not signed in
   
   ### Actual results
   
   Wasn't able to see the embedded dashboard when a superset user is not signed in 
   
   Here's the log:
   ```
   Query SELECT `product` AS `product`,
   COUNT(*) AS `count`
   FROM `ap_analytics_data`.`perf_prod_shp_th_ap`
   WHERE ()
   GROUP BY `product`
   ORDER BY count DESC
   LIMIT 100 on schema ap_analytics_data failed
   Traceback (most recent call last):
     File "/app/superset_home/.local/lib/python3.8/site-packages/google/cloud/bigquery/dbapi/cursor.py", line 203, in _execute
       self._query_job.result()
     File "/app/superset_home/.local/lib/python3.8/site-packages/google/cloud/bigquery/job/query.py", line 1499, in result
       do_get_result()
     File "/app/superset_home/.local/lib/python3.8/site-packages/google/api_core/retry.py", line 349, in retry_wrapped_func
       return retry_target(
     File "/app/superset_home/.local/lib/python3.8/site-packages/google/api_core/retry.py", line 191, in retry_target
       return target()
     File "/app/superset_home/.local/lib/python3.8/site-packages/google/cloud/bigquery/job/query.py", line 1489, in do_get_result
       super(QueryJob, self).result(retry=retry, timeout=timeout)
     File "/app/superset_home/.local/lib/python3.8/site-packages/google/cloud/bigquery/job/base.py", line 728, in result
       return super(_AsyncJob, self).result(timeout=timeout, **kwargs)
     File "/app/superset_home/.local/lib/python3.8/site-packages/google/api_core/future/polling.py", line 261, in result
       raise self._exception
   google.api_core.exceptions.BadRequest: 400 Syntax error: Unexpected ")" at [4:8]
   ```
   
   #### Screenshots
   
   ![400 Syntax error](https://drive.google.com/uc?export=view&id=1jK39_gd7oAzZCQl2YhKmtjUJkf-JI6RX)
   or
   [Click here](https://drive.google.com/file/d/1jK39_gd7oAzZCQl2YhKmtjUJkf-JI6RX/view?usp=sharing)
   
   ### Environment
   
   - browser type and version: Google Chrome Incognito Version 109.0.5414.119 (Official Build) (x86_64)
   - superset version: latest
     - Python 3.8.16
     - Flask 2.1.3
     - Werkzeug 2.1.2
   - database: Google BigQuery
     - sqlalchemy-bigquery 1.5.0
   - any feature flags active:
     - EMBEDDED_SUPERSET: True
     - EMBEDDABLE_CHARTS: True
     - ENABLE_TEMPLATE_PROCESSING: True
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [ ] I have reproduced the issue with at least the latest released version of superset.
   - [ ] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   I'm using the embedded superset SDK package and able to successfully retrieve guest token together with superset user & role properly setup. 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] 400 Syntax error: Unexpected ")" at [4:8] [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #22949: 400 Syntax error: Unexpected ")" at [4:8]
URL: https://github.com/apache/superset/issues/22949


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] artemonsh commented on issue #22949: 400 Syntax error: Unexpected ")" at [4:8]

Posted by "artemonsh (via GitHub)" <gi...@apache.org>.
artemonsh commented on issue #22949:
URL: https://github.com/apache/superset/issues/22949#issuecomment-1413482047

   Well, it seems that your SQL query is not constructed properly in this place: `WHERE ()`. Could you make a screenshot of chart in explore view?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] rusackas commented on issue #22949: 400 Syntax error: Unexpected ")" at [4:8]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #22949:
URL: https://github.com/apache/superset/issues/22949#issuecomment-1421289532

   Thanks for the PR! Hopefully those tagged for review will help usher it through :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] 400 Syntax error: Unexpected ")" at [4:8] [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #22949:
URL: https://github.com/apache/superset/issues/22949#issuecomment-1947462732

   Closing this as stale since it's been silent for so long, and we're trying to steer toward a more actionable Issues backlog. If people are still encountering this in current versions (currently 3.x) please re-open this issue, open a new Issue with updated context, or raise a PR to address the problem. Thanks!
   
   Leaving the related PR open though... I'm hopeful it can get a revisit and be pushed across the finish line.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] marlomorales commented on issue #22949: 400 Syntax error: Unexpected ")" at [4:8]

Posted by "marlomorales (via GitHub)" <gi...@apache.org>.
marlomorales commented on issue #22949:
URL: https://github.com/apache/superset/issues/22949#issuecomment-1413549683

   Yeah that's what I also noticed Artem.
   
   But it doesn't happen on explore view.
   [image: test chart on explore view.png]
   
   
   
   
   On Thu, Feb 2, 2023 at 6:16 PM Artem Shumeiko ***@***.***>
   wrote:
   
   > Well, it seems that your SQL query is not constructed properly in this
   > place: WHERE (). Could you make a screenshot of chart in explore view?
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/superset/issues/22949#issuecomment-1413482047>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AUXYIPWAIJXRUQPBLYXHXFTWVOCN7ANCNFSM6AAAAAAUOQBIHQ>
   > .
   > You are receiving this because you authored the thread.Message ID:
   > ***@***.***>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] marlomorales commented on issue #22949: 400 Syntax error: Unexpected ")" at [4:8]

Posted by "marlomorales (via GitHub)" <gi...@apache.org>.
marlomorales commented on issue #22949:
URL: https://github.com/apache/superset/issues/22949#issuecomment-1427261538

   @rusackas @lilykuang @villebro 
   this can also be resolved by making sure the rls filter contains a condition/filter like `1=1` instead of blank string


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] marlomorales commented on issue #22949: 400 Syntax error: Unexpected ")" at [4:8]

Posted by "marlomorales (via GitHub)" <gi...@apache.org>.
marlomorales commented on issue #22949:
URL: https://github.com/apache/superset/issues/22949#issuecomment-1420441840

   @rusackas @lilykuang 👋 
   i tried to fix this issue via [this PR](https://github.com/apache/superset/pull/23016)
   can you please take a look into it and check if it really fixes the issue?
   tbh, i'm not within the python framework/ecosystem - so the fix i made is only comes from what i understand based on the existing logic


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on issue #22949: 400 Syntax error: Unexpected ")" at [4:8]

Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on issue #22949:
URL: https://github.com/apache/superset/issues/22949#issuecomment-1427441592

   @marlomorales I think we should leave out unnecessary filters so that we can maximally leverage the cache: two otherwise identical queries, but where the other has an additional `1 = 1`, would result in a different cache key, and therefore an unnecessary cache miss. I'd rather we figure out why that blank string is generated and get rid of tha.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org