Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Object is not iterable error when result set is empty #316

Closed
albertocalderari opened this issue Mar 16, 2021 · 2 comments · Fixed by #318
Closed

Object is not iterable error when result set is empty #316

albertocalderari opened this issue Mar 16, 2021 · 2 comments · Fixed by #318
Milestone

Comments

@albertocalderari
Copy link

Bug Report

A select query returning no results triggers an exception rather than just an empty result.
This behaviour does not appear when using a different data source which leads to an empty series object (i.e. prometheus)
Screenshot 2021-03-16 at 13 17 52

Expected Behaviour

The chart should display "No data" or no display anything

Actual Behaviour

An Object is not iterable exception is thrown

Steps to Reproduce the Problem

  1. create a new panel
  2. using the BQ source create a query that returns no results:
    i.e. ```SELECT
    $__timeGroupAlias(TimeStamp,1h),
    count(*) AS errors
    from table
    where 1=2

## Specifications

- Version: 2.0.1
- Platform: MacOs 10.15.7
- Grafana Version: Grafana v7.2.1 (72a6c64532)
@ofir5300 ofir5300 added this to the 2.0.2 milestone Mar 16, 2021
@ofir5300
Copy link
Collaborator

ofir5300 commented Mar 16, 2021

Hi @albertocalderari ,
Thanks for sharing this great input, we will probably fix it in the coming release (2.0.2)

@albertocalderari
Copy link
Author

NP, looking forward to the new release!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants