Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'UInt16' object has no attribute '_AccountForMultiplier' #1366

Closed
ghost opened this issue Jan 22, 2018 · 8 comments
Closed

Comments

@ghost
Copy link

ghost commented Jan 22, 2018

I'm writing a test that checks set DMX address. When running my script once in a while I'll get this exception.

This is happening when setting the DMX address.

Traceback (most recent call last):
  File "test.py", line 103, in <module>
    main()
  File "test.py", line 78, in main
    controller.onecmd('%s %s' % ("set", ' '.join(args)))
  File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
    return func(arg)
  File "/home/ldavies/Documents/code/DMX_Add_Testing/ola_rdm_get.py", line 257, in do_set
    self.GetOrSet(PidStore.RDM_SET, line)
  File "/home/ldavies/Documents/code/DMX_Add_Testing/ola_rdm_get.py", line 315, in GetOrSet
    args[1:]):
  File "/usr/lib/python2.7/dist-packages/ola/RDMAPI.py", line 141, in Set
    PidStore.RDM_SET)
  File "/usr/lib/python2.7/dist-packages/ola/RDMAPI.py", line 177, in _SendRequest
    data = pid.Pack(args, request_type)
  File "/usr/lib/python2.7/dist-packages/ola/PidStore.py", line 171, in Pack
    blob, args_used = group.Pack(args)
  File "/usr/lib/python2.7/dist-packages/ola/PidStore.py", line 764, in Pack
    chunk, args_consumed = atom.Pack(args[arg_offset:])
  File "/usr/lib/python2.7/dist-packages/ola/PidStore.py", line 345, in Pack
    (value, self._GetAllowedRanges()))
  File "/usr/lib/python2.7/dist-packages/ola/PidStore.py", line 385, in _GetAllowedRanges
    (self._AccountForMultiplier(range.min),
AttributeError: 'UInt16' object has no attribute '_AccountForMultiplier'

I need to run this test an hour, however, I can't run it longer than 10 minutes without running into this exception.

I've seen #884 but it says that the issue has been closed.

@ghost
Copy link
Author

ghost commented Jan 22, 2018

I just changed the name to _AccountForMultiplierUnpack in PidStore.py

@ghost ghost closed this as completed Jan 22, 2018
@peternewman
Copy link
Member

What version of OLA are you running @ltd9938 and on what OS? This should have been fixed in most supported OSes I believe.

I see your fix worked, but I'm just wondering if something has slipped through the net somewhere.

@ghost
Copy link
Author

ghost commented Jan 22, 2018

0.9.5 on Ubuntu 12.04

@peternewman
Copy link
Member

Ah that would explain it. I suspect you already know (and I didn't used to be much better), but that's really old and out of support (both the OS and OLA):
https://wiki.ubuntu.com/LTS

On a more helpful note, I'm not clear exactly what you're trying to do, but you know we have a full suite of RDM tests:
https://www.openlighting.org/rdm-tools/rdm-responder-tests/

@ghost
Copy link
Author

ghost commented Jan 22, 2018

Company is requiring 12.04. Is there a way to update OLA? apt-get says it's up to date.

I know about the suite! It's great! I just had to write a basic script to test a small bug in our controllers.

@peternewman
Copy link
Member

I work in a large company, but even they try and avoid using unsupported OSes, I'm amazed they're requiring it now when it's been out of support for 9 months or so now!

Probably build from scratch (or debuild the deb from scratch), then use that, our Travis continuous integration was running against 12.04 until not too long ago, so I think it will probably still build fine on that OS.

Now I'm curious, is it a bug our tests didn't catch? You know you can just run selected tests against a device if you want, you don't have to run the entire suite.

@ghost
Copy link
Author

ghost commented Jan 22, 2018

We've gotten a report that the DMX start address on our controllers has been resetting to 1 after a certain amount of sets, so I made a script that randomly and continuously set the address.

@peternewman
Copy link
Member

Perhaps try that, interspersed with random RDM responder tests, in case it's the act of sending some other PID that gets it in a funny state, which causes the start address set to go wrong.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant