title: Prometheus-client : how to specify a list of labels
body: <p>I use prometheus client, but have issues specifying the correct label values, corresponding to a metric I just created.</p>
  <pre><code>import pprint
  from prometheus_client import Gauge
  
  
  # --- At one location, a specific set of labels is defined for a metric.
  lbls = [&quot;color&quot;, &quot;orientation&quot;]
  metric= Gauge (&quot;metricid&quot;, &quot;description&quot;, lbls)
  pprint.pprint(metric._labelnames)
  
  lvalue = {&quot;color&quot; : &quot;red&quot;,  &quot;orientation&quot; : &quot;vertical&quot; }
  label_values = tuple(str(lvalue[key]) for key in lvalue)
  label_values = [str(lvalue[key]) for key in lvalue]
  print(&quot;----&quot;)
  pprint.pprint(label_values)
  print(&quot;----&quot;)
  metric.labels(label_values).set(&quot;99&quot;)
  </code></pre>
  <p>The output I get is :</p>
  <pre><code>('color', 'orientation')
  ----
  ['red', 'vertical']
  ----
  Traceback (most recent call last):
    File &quot;snippet1.py&quot;, line 19, in &lt;module&gt;
      metric.labels(label_values).set(&quot;99&quot;)
    File &quot;/home/gtos/.local/lib/python3.6/site-packages/prometheus_client/metrics.py&quot;, line 177, in labels
      raise ValueError('Incorrect label count %d %d '% (len(labelvalues), len(self._labelnames)))
  ValueError: Incorrect label count 1 2
  </code></pre>
  <p>Although I pass a list / or tuple with 2 elements, the prometheus client library complains, it consists of only 1 element.</p>
  <p>Can someone highlight what I missed?</p>
  <p>Rgds</p>
  <p>Luc</p>