beis0118 opened a new issue #16311:
URL: https://github.com/apache/superset/issues/16311


   When i use the sqllab to query my data from databases(such as mysql and 
clickhouse) , the bug in title happened.
   
   ### Expected results
   
   Get the right data from my databases.
   
   ### Actual results
   
   Database error Instance <Query at 0x1b8f2ec1e50> is not bound to a Session; 
attribute refresh operation cannot proceed (Background on this error at: 
http://sqlalche.me/e/13/bhk3).
   
   #### Screenshots
   
   
![image](https://user-images.githubusercontent.com/59128541/129832948-8d915fad-10a2-4e7d-8fb0-c4432bac2f16.png)
   
![image](https://user-images.githubusercontent.com/59128541/129833035-b645d8d0-cbf5-4657-baca-f341cb403f68.png)
   
   #### How to resolve the bug
   
   1. Go to 'superset/views/core'
   2. Find th method '_sql_json_sync'
   3. annotation two line:
   `            
   payload = json.dumps(
                   apply_display_max_row_limit(data),
                   default=utils.pessimistic_json_iso_dttm_ser,
                   ignore_nan=True,
                   encoding=None,
               )
   `
   with
   `            
   payload = json.dumps(
                   apply_display_max_row_limit(data),
                   default=utils.pessimistic_json_iso_dttm_ser,
                   #ignore_nan=True,
                   #encoding=None,
               )
   `
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to