Python URX Return value of digital inputs issue

I am using Python 3.6 and have the URX 0.10.0 module installed. I am having difficulty returning the value of digital inputs ,DI0 (zero) shown. I am sure that it is a syntax issue, but I am in a bit of a fog.

The code line is;
x = rob.get_digital_in(0,‘nb’) # This is the value I need to return
print("get digital in 0 = " +str(x))

The returned print is 0. even though DI0 on the I/O screen (UR-5) is True.

Any help is appreciated. My hide is pretty thick so if I have made a “stupid” mistake, please let me know.

Did you get it going?

Peter,
Wow, this is an old question, I almost forgot what it was about. The answer is yes, I got it going and it was my code that was the issue. There are a few other ways to solve, but in the end, it was a syntax issue.
Thanks for reaching out,
Jerry