0
$\begingroup$

I am running my old qiskit code after a very long time it's not running now showing error wrong color format 'ansibrightred' and I don't know why?

from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister

circuit = QuantumCircuit(2,2)
circuit.h(0)
circuit.cx(0,1)
circuit.measure([0,1], [0,1])
$\endgroup$
1
  • $\begingroup$ Hi! What Qiskit versions are you using? $\endgroup$
    – met927
    Commented Apr 23, 2020 at 8:04

1 Answer 1

3
$\begingroup$

That error is caused by running qiskit-terra 0.13.0 with pygments installed, but below the optional dependency minimum version of 2.4: https://github.com/Qiskit/qiskit-terra/blob/master/setup.py#L117. However, you've found a bug in terra, an error should only be shown if you are using the optional functionality (circuit.qasm() with formatted=True set or using the circuit library jupyter widget). I've pushed up a fix to address this edge case in: https://github.com/Qiskit/qiskit-terra/pull/4229

In the meantime while waiting for that to get into a release, you can workaround this issue by either installing pygments>=2.4 or uninstalling pygments. Either will fix the error.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.