After Ubuntu upgrade - AttributeError: 'module' object has no attribute '_set_dut_singleton'

25 views
Skip to first unread message

Andrew Liverod

unread,
Oct 29, 2018, 9:55:56 AM10/29/18
to stb-tester
Hi

I've just upgraded from Ubuntu 14.04 to 16.04 and then 18.04 and had the following error when running stbt (v28). It and my scripts worked fine with 14.04 but fail with either 16.04 or 18.04:

stbt-run: Arguments:
control: lirc::amino-h150
save_trace: None
save_thumbnail: never
verbose: 1
args: []
source_pipeline: decklinkvideosrc connection=hdmi mode=720p50 device-number=0 ! videoconvert
save_screenshot: on-failure
script: run.py
restart_source: False
sink_pipeline: xvimagesink sync=false
save_video:
stbt-run: sink pipeline: appsrc name=appsrc format=time caps=video/x-raw,format=(string)BGR ! tee name=t  t. ! queue leaky=downstream ! videoconvert ! xvimagesink sync=false
stbt-run: source pipeline: decklinkvideosrc connection=hdmi mode=720p50 device-number=0 ! videoconvert ! queue name=_stbt_user_data_queue max-size-buffers=0     max-size-bytes=0 max-size-time=10000000000 ! decodebin ! queue name=_stbt_raw_frames_queue max-size-buffers=2 ! videoconvert ! video/x-raw,format=BGR ! identity ! appsink name=appsink max-buffers=1 drop=false sync=true emit-signals=true caps=video/x-raw,format=BGR
stbt-run: LircRemote: Connecting to /var/run/lirc/lircd
stbt-run: LircRemote: Connected to /var/run/lirc/lircd
FAIL: run.py: AttributeError: 'module' object has no attribute '_set_dut_singleton'
Traceback (most recent call last):
  File "/usr/lib/stbt/_stbt/stbt_run.py", line 118, in sane_unicode_and_exception_handling
    yield
  File "/usr/lib/stbt/stbt-run", line 50, in main
    with sane_unicode_and_exception_handling(args.script), video(args, dut):
  File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/usr/lib/stbt/_stbt/stbt_run.py", line 37, in video
    with stbt._set_dut_singleton(dut), dut:  # pylint: disable=protected-access
AttributeError: 'module' object has no attribute '_set_dut_singleton'

Cheers
Andrew

Andrew Liverod

unread,
Oct 29, 2018, 10:03:26 AM10/29/18
to stb-tester
I've tried stbt with a really simple script as well:

  while (True):
    pass

and then:
  # stbt run --control=lirc::amino-h150 test.py

Same problem.

FAIL: view_stream/view_stream.py: AttributeError: 'module' object has no attribute '_set_dut_singleton'

Traceback (most recent call last):
  File "/usr/lib/stbt/_stbt/stbt_run.py", line 118, in sane_unicode_and_exception_handling
    yield
  File "/usr/lib/stbt/stbt-run", line 50, in main
    with sane_unicode_and_exception_handling(args.script), video(args, dut):
  File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/usr/lib/stbt/_stbt/stbt_run.py", line 37, in video
    with stbt._set_dut_singleton(dut), dut:  # pylint: disable=protected-access
AttributeError: 'module' object has no attribute '_set_dut_singleton'

Cheers
Andrew

David Röthlisberger

unread,
Oct 30, 2018, 6:20:51 AM10/30/18
to stb-t...@googlegroups.com, livea...@gmail.com
Presumably you have a different (older) copy of stbt somewhere on your import path, and stbt-run is importing that instead of the v28 version.

Kind regards,

David Röthlisberger
Stb-tester.com Ltd.

--
Stb-tester.com Ltd is a company registered in England and Wales.
Registered number: 08800454. Registered office: 33b Aliwal Road,
Battersea, London, SW11 1RB.
--
You received this message because you are subscribed to the Google Groups "stb-tester" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stb-tester+...@googlegroups.com.
To post to this group, send email to stb-t...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Liverod

unread,
Oct 30, 2018, 8:23:23 AM10/30/18
to stb-tester
Hi David

You were right. Something went wrong when I last updated. I removed the stb-tester package, checked /usr/lib and there was still a load of *.pyc files in there. Removed the files, re-installed stb-tester and it's now working fine.

Thanks for your help
Andrew
Reply all
Reply to author
Forward
0 new messages