Page MenuHomePhabricator

add_text.py crashes for some uses of -cat
Closed, ResolvedPublic

Description

Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1329/
Reported by: dabzzz
Created on: 2011-08-05 19:01:42
Subject: add_text.py crashes for some uses of -cat
Assigned to: bewareofdoug
Original description:
Crashes without further information; works correct on category without umlaut in it. Happens on my bot account at de.hardware-wiki.org

$ python add_text.py -cat -text:someveryimportantmessage -up -verbose
Config.py
- base_dir:  /home/bzzz/.pywikipedia
- done.
Pywikipediabot [http] trunk/pywikipedia (r9430, 2011/08/04, 08:15:02)
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) 
[GCC 4.5.2]
Please enter the category name: Festplatten nach Größe
Getting [[Kategorie:Festplatten nach Größe]]... <--exists, has subcategories and is categorized
==== API action:query ====
cmprop: title|ids|sortkey|timestamp
list: categorymembers
cmlimit: 500
cmtitle: Kategorie:Festplatten nach Größe
----------------
Requesting API query from HardwareWiki:de
[End]

Same happens if the working category is given via -cat:Festplatten_nach_Größe or within "".

pywikipediabot is at latest svn version (9430, simplejson 242), working on Kubuntu 11.04 Natty with 2.6.38-10-generic kernel;  python version.py yields:
Pywikipedia [http] trunk/pywikipedia (r9430, 2011/08/04, 08:15:02)
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) 
[GCC 4.5.2]
config-settings:
use_api = True
use_api_login = True
unicode test: ok

Version: unspecified
Severity: normal
See Also:
https://sourceforge.net/p/pywikipediabot/bugs/1329

Details

Reference
bz55240

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:29 AM
bzimport set Reference to bz55240.
bzimport added a subscriber: Unknown Object (????).

The problem is not with umlauts per se, I have tested \(r9811\) on botwiki and de.hardware-wiki.org and can use both:

python add\_text.py -cat -text:someevenmoreimportantmessage -up -v
with the category: Für\_Prüfung

and

python add\_text.py -cat:Für\_Prüfung -text:someveryimportantmessage -up -v

without difficulty in my bot's userspace

But I can replicate the above termination using the same cat on that wiki.

I note that the category has 40 subcats and several hundred pages. I also note that the above cat also contains an esszet.

Reducing to priority 3 as this is the only reported instance and it would appear to have a relatively minor impact \(replace.py should work in lieu of add\_text.py\)

Assigning to self to investigate further.

It would be useful if the reporter could give more information on examples of cats where this worked \(eg. did it work with esszet, did it work on similar sized cats, etc.\)

  • labels: 745454 --> category
  • milestone: --> confirmed
  • priority: 5 --> 3
  • assigned_to: nobody --> bewareofdoug
  • summary: add_text.py crashes on usage with umlaut --> add_text.py crashes for some uses of -cat

Well, the ß may be part of the problem. Same problem exists on cats like "Kategorie:SSDs nach Größe" \(42 sub categories\) or "Gehäuse nach Größe‏‎" \(21 sc\).

However, "GPU-Kühler nach Kompatibilität" \(155 sc\) also fails, but has no eszett in it. "Kühler für AMD Sockel AM3‏‎" \(97 sc\) works...

I tested using master version of pywikibot downloaded from gerrit and I have not problems with this..

  1. I runned pywiki on my wiki in localhost with command
python add_text.py -cat -text:someveryimportantmessage -up -verbose
  1. When he requested category I added Festplatten nach Größe
  2. And he changed without problems.
Aklapper subscribed.

@Zoranzoki21: What was your exact output for the API action:query? See the task description.

@Zoranzoki21: What was your exact output for the API action:query? See the task description.

C:\Users\ZoranD\Desktop\pywikibot>python pwb.py add_text -page:User:Zoranzoki21/
????? -text:someveryimportantmessage -up -verbose
Pywikibot rede13695872939f4cedbb139bd03ead318ef64cb
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)]

Loading Корисник:Zoranzoki21/песак...
Found 2 localhost:sr processes running, including this one.


>>> Корисник:Zoranzoki21/песак <<<
@@ -0,0 +1 @@
+ someveryimportantmessage

Do you want to accept these changes? ([y]es, [N]o, [a]ll, open in [b]rowser, [q]
uit): y
Page [[Корисник:Zoranzoki21/песак]] saved
Dropped throttle(s).
Closing network session.
Network session closed.

C:\Users\ZoranD\Desktop\pywikibot>

It is all

Dvorapa reopened this task as Open.EditedJan 12 2018, 5:27 PM
Dvorapa subscribed.

The issue was found on Python 2.7.1, but tested on Python 3.6.4, therefore the test wasn't performed under the same (or at least similar) conditions

The issue was found on Python 2.7.1, but tested on Python 3.6.4, therefore the test wasn't performed under the same (or at least similar) conditions

Support will be soon abolished

Not really soon. Python 2.7 will be supported for at least two years since now and then it may be lengthened

Not really soon. Python 2.7 will be supported for at least two years since now and then it may be lengthened

I talk about pywiki

pywikibot will support Python 2.7 at least next two years, the same length as Python community itself

Hardware wiki is closed, similar categories in de.wiki works as expected (tried 20 cats with all combinations above in py2 and py3), please reopen if this issue pops up once more