Python Forum
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AttributeError
#31
Does the command look correct to you? What was it trying to do? Do you normally see this delivery failure?
Reply
#32
No, i have never seen this delivery failure.
But it is now showing up because of the print function.
Reply
#33
Hi deanhystad,

Thank you for your help.
I am kind of stuck to go from here Smile

With the kindest regards,

Mark
Reply
#34
You started this thread over 2 years ago, so it's not like this is a raging fire.

Printing is either messing up some stdio thing or it is causing a communication timeout. Looks like printing is bad.

Can you do anything with this device? Do some things work and others not? If so, what is working and what is failing.

I looked through the source code and there is not much code that depends on a particular python version (really just 2.7 or before vs 3.0 and newer).
Reply
#35
I finally have found the solution.
The error occurs because sys.stdout is not a binary stream but rather a text stream.
To fix:

Open the compact. py file located in c: \program files\python311\lib\site-packages\pycampbellcr1000.
Find the line that reads stdout = sys.stdout. buffer and replace it with stdout = getattr(sys.stdout, 'buffer', sys.stdout)
Save the file and re run the code.
Reply
#36
High marks for perseverance!
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020