AssertionError: wrong color format 'ansibrightred' - quantum-computing

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
# %matplotlib inline
circuit = QuantumCircuit(3,3)
circuit.h(0)
circuit.h(1)
circuit.h(2)
circuit.measure([0,1], [0,1])

I ran into the same problem. I solved it by removing my install and installing qiskit==0.16.2.
pip install qiskit==0.16.2

Related

NAO Robot: suspicious beep on ALTextToSpeech

I get a suspicious short (100ms ?) beep sound after every phrase (stringToSay) executed with:
void ALTextToSpeechProxy::say(const std::string& stringToSay);
I get it only on my newer V6 robot, not on the old one V5. I have experienced it when running C++ compiled module, but the phenomenon may be easily observed even with the following simple .py code, executed on the robot. It's like after "hello" comes a short break and then a beep.
#! /usr/bin/env python
import qi
import sys
def main(session):
tts = session.service("ALTextToSpeech")
tts.say("hello")
session = qi.Session()
session.connect("tcp://127.0.0.1:9559")
main(session)
I have finally solved the BEEP problem by simply upgrading the original NAOqi 2.8.4.2 to the latest version 2.8.6.23. I did it with robot_settings app.
Could anybody tell me if one observes a beep following the word "hello" when running the enclosed simple code on one's robot? The NAOqi version I'm running is 2.8.4.2.
#! /usr/bin/env python
import qi
import sys
session = qi.Session()
session.connect("tcp://127.0.0.1:9559")
tts = session.service("ALTextToSpeech")
tts.say("hello")

Chromium build failed on Ubuntu : ERROR at //build_overrides/build.gni:5:1: Unable to load "/home/chromium/src/build/config/gclient_args.gni"

I am trying to build Chromium on Ubuntu using these instructions
[1] https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions.md
and getting below error
VirtualBox:~/chromium/src$ gn gen out/Default
ERROR at //build_overrides/build.gni:5:1: Unable to load "/home/chromium/src/build/config/gclient_args.gni".
import("//build/config/gclient_args.gni")
^---------------------------------------
See //build/toolchain/toolchain.gni:9:1: whence it was imported.
import("//build_overrides/build.gni")
^-----------------------------------
See //build/config/coverage/coverage.gni:5:1: whence it was imported.
import("//build/toolchain/toolchain.gni")
^---------------------------------------
See //build/config/sanitizers/sanitizers.gni:7:1: whence it was imported.
import("//build/config/coverage/coverage.gni")
^--------------------------------------------
See //build/config/compiler/compiler.gni:8:1: whence it was imported.
import("//build/config/sanitizers/sanitizers.gni")
^------------------------------------------------
See //BUILD.gn:11:1: whence it was imported.
import("//build/config/compiler/compiler.gni")
^--------------------------------------------
Has anyone faced this issue?
I had the same problem. I fix by adding the missing file (I've copied from an old build) and than run:
gclient sync --force
Than I run again the getThirdParties.js and gn args out/Default.

How to fix problems with double typing when use IEDriver

I have a very strange behavior via IE Driver 32 bit. For example I input "Hello! My name is Maria." But result is:
I've tried to use 64 bit, but the result is the same.
Has anyone else come across this problem?
My environment: Windows 10, C#+SpecFlow, WebDriver.IEDriverServer.win32, IE(11.608).
For me downgrading of IEDriverServer on version 3.2.0 solved problem.

rpm and Yum don't believe a package is installed after Chef installs

Running chef-solo (Installing Chef Omnibus (12.3)) on centos6.6
My recipe has the following simple code:
package 'cloud-init' do
action :install
end
log 'rpm-qi' do
message `rpm -qi cloud-init`
level :warn
end
log 'yum list' do
message `yum list cloud-init`
level :warn
end
But it outputs the following:
- install version 0.7.5-10.el6.centos.2 of package cloud-init
* log[rpm-qi] action write[2015-07-16T16:46:35+00:00] WARN: package cloud-init is not installed
[2015-07-16T16:46:35+00:00] WARN: Loaded plugins: fastestmirror, presto
Available Packages
cloud-init.x86_64 0.7.5-10.el6.centos.2 extras
I am at a loss as to why rpm/yum and actually rpmquery don't see the package as installed.
EDIT: To clarify I am specifically looking for the following string post package install to then apply a change to the file (I understand this is not a very chef way to do something I am happy to accept suggestions):
rpmquery -l cloud-init | grep 'distros/__init__.py$'
I have found that by using the following:
install_report = shell_out('yum install -y cloud-init').stdout
cloudinit_source = shell_out("rpmquery -l cloud-init | grep 'distros/__init__.py$'").stdout
I can then get the file I am looking for and perform
Chef::Util::FileEdit.new(cloudinit_source.chomp(''))
The file moves based on the distribution but I need to edit that file specifically with in place changes.
Untested code, just to give the idea:
package 'cloud-init' do
action :install
notifies :run,"ruby_block[update_cloud_init]"
end
ruby_block 'update_cloud_init' do
block do
cloudinit_source = shell_out("rpmquery -l cloud-init | grep 'distros/__init__.py$'").stdout
rc = Chef::Util::FileEdit.new(cloudinit_source.chomp(''))
rc.search_file_replace_line(/^what to find$/,
"replacement datas for the line")
rc.write_file
end
end
ruby_block example taken and adapted from here
I would better go using a template to manage the whole file, what I don't understand is why you don't know where it will be at first...
Previous answer
I assume it's a compile vs converge problem. at the time the message is stored (and so your command is executed) the package is not already installed.
Chef run in two phase, compile then converge.
At compile time it build a collection of resources and at converge time it execute code for the resource to get them in the described state.
When your log resource is compiled, the ugly back-ticks are evaluated, at this time there's a package resource in the collection but the resource has not been executed, so the output is correct.
I don't understand what you want to achieve with those log resources at all.
If you want to test your node state after chef-run use a handler maybe calling ServerSpec as in Test-Kitchen.

svm_learn command of svm_light not working

I am following this tutorial http://svmlight.joachims.org/ to set up SVMLight on my laptop, running Ubuntu 11.10
While attempting to run the svm_learn,
command svm_learn example1/train.dat example1/model
as shown in the Inductive SVM section. I get the error
svm_learn: command not found
I checked up on the internet but I found no solutions to this problem.
PS : I am running the command from the svm_light folder that contains the extracted contents of the SVMLight archive.
Please help.
You should try ./svm_learn train_File.dat
and you will get a model file , don't forget to download SVM-Light ( Source Code or Binaries )
./svm_learn ../example1/train.dat ../example1/model

Resources