You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sfirke (via GitHub)" <gi...@apache.org> on 2024/08/30 21:08:41 UTC

[I] Clicking on a chart causes an error in logs: ERROR:superset.utils.json:JSON is not valid (4.1.0rc2) [superset]

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

   ### Bug description
   
   I am seeing this error often in the logs as I demo 4.1.0rc2.  One way I can produce it is by navigating to the Charts list, then clicking on a chart.  Same for Dashboards.  When I do that I get:
   
   ```python
   superset_app          | 2024-08-30 21:02:54,015:ERROR:superset.utils.json:JSON is not valid Expecting value: line 1 column 1 (char 0)
   superset_app          | Traceback (most recent call last):
   superset_app          |   File "/app/superset/utils/json.py", line 244, in loads
   superset_app          |     return simplejson.loads(
   superset_app          |   File "/usr/local/lib/python3.10/site-packages/simplejson/__init__.py", line 514, in loads
   superset_app          |     return _default_decoder.decode(s)
   superset_app          |   File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 386, in decode
   superset_app          |     obj, end = self.raw_decode(s)
   superset_app          |   File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 416, in raw_decode
   superset_app          |     return self.scan_once(s, idx=_w(s, idx).end())
   superset_app          | simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
   ```
   
   The chart edit view loads correctly, I don't see a way in which this is causing problems but it is spamming the logs. 
   
   ### How to reproduce the bug
   
   1. Load the list of charts or dashboards
   2. Click one of them
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   I don't know
   
   ### Node version
   
   I don't know
   
   ### Browser
   
   Firefox
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.


-- 
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] Clicking on a chart causes an error in logs: ERROR:superset.utils.json:JSON is not valid (4.1.0rc2) [superset]

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

   Seems related with cache interaction, I see such errors following retrieval attempts e.g.:
   
   ```
   ...
   2024-09-01 17:33:40,365:INFO:superset.utils.screenshots:Attempting to get from cache: 
   ...
   2024-09-01 17:33:40,446:INFO:superset.utils.screenshots:Attempting to get from cache: 9ac7aac76755e14d175d865d1cedcd3c
   2024-09-01 17:34:11,728:ERROR:superset.utils.json:JSON is not valid Expecting value: line 1 column 1 (char 0)
   Traceback (most recent call last):
     File "/app/superset/utils/json.py", line 244, in loads
       return simplejson.loads(
     File "/usr/local/lib/python3.10/site-packages/simplejson/__init__.py", line 514, in loads
       return _default_decoder.decode(s)
     File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 386, in decode
       obj, end = self.raw_decode(s)
     File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 416, in raw_decode
       return self.scan_once(s, idx=_w(s, idx).end())
   simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
   2024-09-01 17:34:11,786:INFO:superset.viz:Cache key: c11beccf261da40e33f4c680892375ea
   2024-09-01 17:34:11,789:ERROR:superset.utils.json:JSON is not valid Expecting value: line 1 column 1 (char 0)
   Traceback (most recent call last):
     File "/app/superset/utils/json.py", line 244, in loads
       return simplejson.loads(
     File "/usr/local/lib/python3.10/site-packages/simplejson/__init__.py", line 514, in loads
       return _default_decoder.decode(s)
     File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 386, in decode
       obj, end = self.raw_decode(s)
     File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 416, in raw_decode
       return self.scan_once(s, idx=_w(s, idx).end())
   simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
   2024-09-01 17:34:11,811:WARNING:superset.views.base:Superset.explore_json This API endpoint is deprecated and will be removed in version 5.0.0
   2024-09-01 17:34:11,812:ERROR:superset.utils.json:JSON is not valid Expecting value: line 1 column 1 (char 0)
   Traceback (most recent call last):
     File "/app/superset/utils/json.py", line 244, in loads
       return simplejson.loads(
     File "/usr/local/lib/python3.10/site-packages/simplejson/__init__.py", line 514, in loads
       return _default_decoder.decode(s)
     File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 386, in decode
       obj, end = self.raw_decode(s)
     File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 416, in raw_decode
       return self.scan_once(s, idx=_w(s, idx).end())
   simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
   2024-09-01 17:34:11,942:INFO:superset.viz:Cache key: 5d5c68a6a844ad9a2240ff187701bb5a
   2024-09-01 17:34:12,601:WARNING:superset.models.helpers:Unable to parse SQL to format it, passing it as-is
   2024-09-01 17:34:12,748:ERROR:superset.utils.json:JSON is not valid Expecting value: line 1 column 1 (char 0)
   Traceback (most recent call last):
     File "/app/superset/utils/json.py", line 244, in loads
       return simplejson.loads(
     File "/usr/local/lib/python3.10/site-packages/simplejson/__init__.py", line 514, in loads
       return _default_decoder.decode(s)
     File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 386, in decode
       obj, end = self.raw_decode(s)
     File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 416, in raw_decode
       return self.scan_once(s, idx=_w(s, idx).end())
   simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
   ...
   ```
   There's also the SQL parsing warning, which may be unrelated.
   Besides log pollution with these exceptions, the cache failures also lead to increasing number of requests to Celery workers in order to regenerate thumbnails.


-- 
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] Clicking on a chart causes an error in logs: ERROR:superset.utils.json:JSON is not valid (4.1.0rc2) [superset]

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina closed issue #30079: Clicking on a chart causes an error in logs: ERROR:superset.utils.json:JSON is not valid (4.1.0rc2)
URL: https://github.com/apache/superset/issues/30079


-- 
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