Opened 4 years ago

Last modified 20 months ago

#15349 reopened defect

Stem out of date in deb.torproject.org (1.2.2 rather than 1.3.0)

Reported by: Lluis Sala Owned by: atagar
Priority: Low Milestone:
Component: Internal Services/Service - dist Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Running the script is giving the error:

File "cursesBW.py", line 68, in _handle_bandwidth_event _render_graph(window, bandwidth_rates)

File "cursesBW.py", line 78, in _render_graph
label = "Downloaded (%s/s):" % str_tools.size_label(download_rates[0], 1)
AttributeError: 'module' object has no attribute 'size_label'

After seeking, I found the symbol definition of 'get_size_label' in:

/usr/lib/python2.7/dist-packages/stem/util/str_tools.py

I substituted 'size_label' by 'get_size_label' and it worked.

Child Tickets

Attachments (1)

cursesBW.py (5.2 KB) - added by Lluis Sala 4 years ago.
Script that worked for me

Download all attachments as: .zip

Change History (7)

Changed 4 years ago by Lluis Sala

Attachment: cursesBW.py added

Script that worked for me

comment:1 Changed 4 years ago by atagar

Component: - Select a componentStem
Owner: set to atagar

comment:2 Changed 4 years ago by atagar

Resolution: worksforme
Status: newclosed

Hi Lluis, is your copy of stem out of date? Version 1.3 dropped the need for a 'get_*' prefix from the utility functions.

If you're running Stem 1.3 the example should work. If you're using Stem 1.2.2 or earlier you need to call get_size_label() instead.

Feel free to reopen if you have any other questions.

comment:3 Changed 4 years ago by Lluis Sala

You are right, "aptitude show" is giving me:

"Version: 1.2.2-1~bpo70+1"

I have "Debian wheezy" and "http://deb.torproject.org/torproject.org repositories"
in my "/etc/sources.list".

Debian repositories offer v. "python-stem (1.3.0-1)"

So "aptitude" may took v. 1.2.2 from "torproject.org" ?

Thanks for your assistance.

comment:4 Changed 4 years ago by atagar

Component: StemService - dist
Priority: normalminor
Resolution: worksforme
Status: closedreopened
Summary: Symbol "str_tools" not defined in "Tortoise and the Hare" tutorial's scriptStem out of date in deb.torproject.org (1.2.2 rather than 1.3.0)

Oh, that indeed sounds like an issue. Adjusting the summary and sending it over. Thanks for the catch!

comment:5 Changed 4 years ago by atagar

Hmmm, maybe I'm looking in the wrong spot but doesn't seem like the tpo repo includes Stem. Dererk is Stem's Debian maintainer so he'd know.

For what it's worth I was just looking at the TPO deb repositories wondering "should I add this to Stem's download page?". Ubuntu especially tends to be out of date so offering Stem for those platforms might have some value but again, up to Dererk.

comment:6 Changed 20 months ago by teor

Severity: Normal

Set all open tickets without a severity to "Normal"

Note: See TracTickets for help on using tickets.