zanata_users.py does not work with new Zanata (3.9.6)

Bug #1670725 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack i18n
Fix Released
Medium
Akihiro Motoki

Bug Description

zanata_users.py does not work with Zanata 3.9.6.
zanata_users.py parses the generated web pages, so there is no surprise after upgrading zanata.

ubuntu@sheep6:~/tmp/i18n/tools/zanata (master)[15:23:51]$ python zanata_users.py
Retreiving language list
Getting member list from language el
member_url=/language/view/el?dswid=-5508
Traceback (most recent call last):
  File "zanata_users.py", line 145, in <module>
    data = collect_zanata_language_and_members()
  File "zanata_users.py", line 120, in collect_zanata_language_and_members
    for role, user_id in zanata.iter_language_members(member_url):
  File "zanata_users.py", line 51, in iter_language_members
    span_txt = user.find('span', {'class': 'list__item__meta'}).text
AttributeError: 'NoneType' object has no attribute 'text'

Revision history for this message
Akihiro Motoki (amotoki) wrote :

If someone is interested in fixing it, feel free to take it.

Changed in openstack-i18n:
importance: Undecided → Medium
Revision history for this message
Akihiro Motoki (amotoki) wrote :

After a quick look, it looks easier to fix it than I thought.
Anyway hardcoded code :)

Changed in openstack-i18n:
assignee: nobody → Akihiro Motoki (amotoki)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to i18n (master)

Fix proposed to branch: master
Review: https://review.openstack.org/442597

Changed in openstack-i18n:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to i18n (master)

Reviewed: https://review.openstack.org/442597
Committed: https://git.openstack.org/cgit/openstack/i18n/commit/?id=99b4f6e2aedb56ec706906da8be54e24858497b7
Submitter: Jenkins
Branch: master

commit 99b4f6e2aedb56ec706906da8be54e24858497b7
Author: Akihiro Motoki <email address hidden>
Date: Tue Mar 7 16:03:37 2017 +0000

    Fix zanata_users.py to support Zanata 3.9.6

    HTML of individual language page was changed in Zanata 3.9.6.
    This commit catches up with the change.

    Closes-Bug: #1670725
    Change-Id: I77df5c1f4b716b395f0f686b6a9e2e48649bedcf

Changed in openstack-i18n:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers