Bugs item #3346901, was opened at 2011-06-30 07:48
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3346901&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: Later
Priority: 5
Private: No
Submitted By: Helder (heldergeovane)
Assigned to: xqt (xqt)
Summary: Fix translateAndCapitalizeNamespaces for Portuguese
Initial Comment:
Per discussion on
https://secure.wikimedia.org/wikipedia/pt/wiki/Wikipédia:Esplanada/proposta…"Imagem"_em_vez_de_"Arquivo"_ou_"Ficheiro"_(12mar2011)?uselang=en
please, change the function translateAndCapitalizeNamespaces (from cosmetic_changes.py) so that the bots stop doing the following chnges:
* Image --> Ficheiro
* File --> Ficheiro
* Arquivo --> Ficheiro
* Imagem --> Ficheiro
This is necessary in order to avoid linguistic problems, considering that "Arquivo" is the preferred word on Brazil but "Ficheiro" is preferred on Portugal.
For **image** files, the word "Imagem" is common to both Portuguese variants, and as such it is preferred, so this should be the name used when changing the namespace name of images. The use of "Ficheiro" and "Arquivo" is preferred only for **other kinds of files** (such as PDF or OGG), which are not images.
So, in short, the bots should do the following changes:
* For images (i.e. files with one of the following extensions: png, gif, jpg, jpeg, svg, tiff, tif), change:
** Image --> Imagem
** File --> Imagem
** Ficheiro --> Imagem
** Arquivo --> Imagem
*For other files (i.e. files with one of the following extensions: xcf, pdf, mid, ogg, ogv, djvu, oga):
** Arquivo --> Do not change (we should respect the variant used by the editors)
** Ficheiro --> Do not change (we should respect the variant used by the editors)
** File --> Do not change (or change randomly to "Ficheiro" or "Arquivo", since it is indeed a "file" and both pt and pt-BR are acceptable)
** Image --> Do not change (or change randomly to "Ficheiro" or "Arquivo", since it is indeed a "file" and both pt and pt-BR are acceptable)
** Imagem --> Do not change (or change randomly to "Ficheiro" or "Arquivo", since it is indeed a "file" and both pt and pt-BR are acceptable)
PS: the output of "python version.py" is the foolowing, although this bug report applies to all versions:
----
Pywikipedia [http] trunk/pywikipedia (r9323, 2011/06/30, 12:40:56)
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
----
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2012-03-08 08:36
Message:
kxOtUa Hey, thanks for the blog article.Thanks Again. Really Great.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2011-12-11 22:41
Message:
I guess the prio could be degraded since the code is deactivated
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2011-12-11 22:40
Message:
The bot doesn't see the extension of that links. For implement this
behavior, that code needs to be redesigned. Maybe a future feature. If
there is a way for fixing namespace aliases without looking at the
extension, we could do it sooner. I've deactivated
translateAndCapitalizeNamespaces for the file namespace now.
----------------------------------------------------------------------
Comment By: Helder (heldergeovane)
Date: 2011-12-10 11:44
Message:
Raising the priority since this bug is still afecting bots on every
Portuguese wikis.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3346901&group_…
Bugs item #3496399, was opened at 2012-03-02 13:32
Message generated for change (Settings changed) made by binbot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3496399&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: login
Group: None
>Status: Closed
>Resolution: Works For Me
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Major unicode problems in login.py and possibly elsewhere
Initial Comment:
Hi to all.
I have used pywikipedia bots extensively in the past, with more than 30000 articles uploaded. But every few months, new problems seem to crop up :) Maybe it would be wise to use *stable* and *testing* versions of pywikipedia? Anyway, on to the problem:
Part of output when trying to run command
python login.py
...
Select family of sites we are working on (default: wikipedia): 27
The language code of the site we're working on (default: 'en'): sr
Username (sr wikipedia): МирославЋикаБот
Traceback (most recent call last):
File "login.py", line 58, in <module>
import re, os, query
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/query.py", line 29, in <module>
import wikipedia as pywikibot
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/wikipedia.py", line 142, in <module>
from pywikibot import *
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/pywikibot/__init__.py", line 15, in <module>
from exceptions import *
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/pywikibot/exceptions.py", line 13, in <module>
import config
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/config.py", line 533, in <module>
_base_dir = _wt.get_base_dir()
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/wikipediatools.py", line 51, in get_base_dir
create_user_config_file(base_dir)
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/wikipediatools.py", line 6, in create_user_config_file
generate_user_files.create_user_config(base_dir)
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/generate_user_files.py", line 57, in create_user_config
username = unicode(username, console_encoding)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
miroslav@shop-2:~/moji/Vikipedija/pywikipedia/pywikipedia$
I have tried many workarounds, changing user-config.py, changing password to ascii only etc, to little avail. I firmly suspect the FIRST problem is unicode name of the bot.
By commenting out some lines in wikipedia.py I was able to somehow log in, but when trying to work on unicode articles similar problems would appear. So unicode support in replace.py and pagefromfile.py (i tried those two after somehow logging in) is totally broken, I suspect.
Python, Linux used:
Python 2.5.2 (r252:60911, Jan 24 2010, 14:53:14)
[GCC 4.3.2] on linux2
Debian GNU/Linux 5.0
2.6.26.-2-686
Thank you for your help.
Miroslav Cika
miroslavus At yahoo dott com
Also, output of
python version.py
as requested:
...
miroslav@shop-2:~/moji/Vikipedija/pywikipedia/pywikipedia$ python version.py
No user-config.py found in directory '/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia'
Creating...
1: memoryalpha
2: wikitravel
3: loveto
4: meta
5: wikinews
6: openttd
7: lyricwiki
8: test
9: strategy
10: wikibond
11: anarchopedia
12: i18n
13: incubator
14: fon
15: twcareer
16: wiktionary
17: wikitravel_shared
18: vikidia
19: commons
20: uncyclopedia
21: celtic
22: wesolve
23: southernapproach
24: wowwiki
25: wikisource
26: omegawiki
27: wikipedia
28: wikibooks
29: mediawiki
30: wikitech
31: species
32: ubuntutw
33: krefeldwiki
34: battlestarwiki
35: gentoo
36: lockwiki
37: supertux
38: wikiversity
39: botwiki
40: wekey
41: mozilla
42: wikiquote
43: wikia
44: osm
Select family of sites we are working on (default: wikipedia): 27
The language code of the site we're working on (default: 'en'): sr
Username (sr wikipedia): МирославЋикаБот
Traceback (most recent call last):
File "version.py", line 15, in <module>
import config
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/config.py", line 533, in <module>
_base_dir = _wt.get_base_dir()
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/wikipediatools.py", line 51, in get_base_dir
create_user_config_file(base_dir)
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/wikipediatools.py", line 6, in create_user_config_file
generate_user_files.create_user_config(base_dir)
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/generate_user_files.py", line 57, in create_user_config
username = unicode(username, console_encoding)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
miroslav@shop-2:~/moji/Vikipedija/pywikipedia/pywikipedia$
----------------------------------------------------------------------
Comment By: McScrewDriver (mcscrewdriver)
Date: 2012-03-07 10:08
Message:
Guys, thank you for your great help.
This is not a pywikipedia bug at all as it turns out.
I started being suspicious after seeing that cyrillic characters will not
always show properly in Gnome terminal and in Python command line.
It turns out I did not reinstall locales for my language after reinstalling
Debian some months ago. After reinstalling locales as shown here
(http://people.debian.org/~schultmc/locales.html):
1. Install debconf (i.e. run apt-get update then apt-get install
debconf, as root)
2. Run dpkg-reconfigure locales as root
and adding 3 sr locales, terminal started working correctly.
Now I still had some problems when uploading articles containing unicode
characters to sr wiki. This was fixed by editing user-config.py as shown:
# -*- coding: utf-8 -*-
family = 'wikipedia'
# The language code of the site we're working on.
mylang = 'sr'
# The dictionary usernames should contain a username for each site where
you
# have a bot account.
usernames['wikipedia']['sr'] = u'МирославЋикаБот'
log = []
console_encoding = 'utf-8'
# textfile_encoding = 'unicode_escape'
Line with unicode escape encoding must be commented out, and cyrillic chars
upload correctly from then on.
I thank you again for your help and pointers.
Miroslav
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2012-03-03 03:15
Message:
Based on the errors you get, the following is happening:
1) you have not created user-config.py manually
2) you have misconfigured your console (check the output of locale - it's
probably C or ASCII, not, say, sr_SR.utf-8)
3) you have a non-ascii username
Because of the non-ascii username, and the encoding of the console set to
ascii, it is impossible to enter it in the console. You should therefore
create user-config.py yourself, add an utf-8 header:
# -*- coding: utf-8 -*-
and enter your username there (and make sure to save the file as utf-8).
The problem should then be solved.
> "But every few months, new problems seem to crop up :) Maybe it would be
wise to use *stable* and *testing* versions of pywikipedia? "
These problems are generally due to changes in mediawiki, or changes in
configuration. This would not be solved by using a stable version. However,
you can easily get an older version from the SVN repository.
----------------------------------------------------------------------
Comment By: Bináris (binbot)
Date: 2012-03-02 14:30
Message:
I messed it up, sentence "Also, position 0" is intended to be at the end.
----------------------------------------------------------------------
Comment By: Bináris (binbot)
Date: 2012-03-02 14:29
Message:
Hi Мирослав,
I use replace.py daily on Unicode articles and at least in one wiki with
Unicode login name. The problem must be with your computer. However, I
know, character encoding is the biggest mess of informatics. Also,
"position 0:" is suspisious, I saw this when there was a BOM mark that is
not usual on Linux.
Please try to determine when the problems began and what has changed from
the time you successfully used your bot last time.
Normally version.py won't write "No user-config.py found". Please check the
chmod settings for user-config.py, path and encoding (it should be in
Unicode wothout a BOM with codin_ utf-8 in the 1st or 2nd line, that's the
best).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3496399&group_…
Bugs item #3496399, was opened at 2012-03-02 13:32
Message generated for change (Comment added) made by mcscrewdriver
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3496399&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: login
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Major unicode problems in login.py and possibly elsewhere
Initial Comment:
Hi to all.
I have used pywikipedia bots extensively in the past, with more than 30000 articles uploaded. But every few months, new problems seem to crop up :) Maybe it would be wise to use *stable* and *testing* versions of pywikipedia? Anyway, on to the problem:
Part of output when trying to run command
python login.py
...
Select family of sites we are working on (default: wikipedia): 27
The language code of the site we're working on (default: 'en'): sr
Username (sr wikipedia): МирославЋикаБот
Traceback (most recent call last):
File "login.py", line 58, in <module>
import re, os, query
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/query.py", line 29, in <module>
import wikipedia as pywikibot
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/wikipedia.py", line 142, in <module>
from pywikibot import *
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/pywikibot/__init__.py", line 15, in <module>
from exceptions import *
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/pywikibot/exceptions.py", line 13, in <module>
import config
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/config.py", line 533, in <module>
_base_dir = _wt.get_base_dir()
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/wikipediatools.py", line 51, in get_base_dir
create_user_config_file(base_dir)
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/wikipediatools.py", line 6, in create_user_config_file
generate_user_files.create_user_config(base_dir)
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/generate_user_files.py", line 57, in create_user_config
username = unicode(username, console_encoding)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
miroslav@shop-2:~/moji/Vikipedija/pywikipedia/pywikipedia$
I have tried many workarounds, changing user-config.py, changing password to ascii only etc, to little avail. I firmly suspect the FIRST problem is unicode name of the bot.
By commenting out some lines in wikipedia.py I was able to somehow log in, but when trying to work on unicode articles similar problems would appear. So unicode support in replace.py and pagefromfile.py (i tried those two after somehow logging in) is totally broken, I suspect.
Python, Linux used:
Python 2.5.2 (r252:60911, Jan 24 2010, 14:53:14)
[GCC 4.3.2] on linux2
Debian GNU/Linux 5.0
2.6.26.-2-686
Thank you for your help.
Miroslav Cika
miroslavus At yahoo dott com
Also, output of
python version.py
as requested:
...
miroslav@shop-2:~/moji/Vikipedija/pywikipedia/pywikipedia$ python version.py
No user-config.py found in directory '/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia'
Creating...
1: memoryalpha
2: wikitravel
3: loveto
4: meta
5: wikinews
6: openttd
7: lyricwiki
8: test
9: strategy
10: wikibond
11: anarchopedia
12: i18n
13: incubator
14: fon
15: twcareer
16: wiktionary
17: wikitravel_shared
18: vikidia
19: commons
20: uncyclopedia
21: celtic
22: wesolve
23: southernapproach
24: wowwiki
25: wikisource
26: omegawiki
27: wikipedia
28: wikibooks
29: mediawiki
30: wikitech
31: species
32: ubuntutw
33: krefeldwiki
34: battlestarwiki
35: gentoo
36: lockwiki
37: supertux
38: wikiversity
39: botwiki
40: wekey
41: mozilla
42: wikiquote
43: wikia
44: osm
Select family of sites we are working on (default: wikipedia): 27
The language code of the site we're working on (default: 'en'): sr
Username (sr wikipedia): МирославЋикаБот
Traceback (most recent call last):
File "version.py", line 15, in <module>
import config
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/config.py", line 533, in <module>
_base_dir = _wt.get_base_dir()
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/wikipediatools.py", line 51, in get_base_dir
create_user_config_file(base_dir)
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/wikipediatools.py", line 6, in create_user_config_file
generate_user_files.create_user_config(base_dir)
File "/home/miroslav/mydocs/LicniProjekti/Vikipedija/pywikipedia/pywikipedia/generate_user_files.py", line 57, in create_user_config
username = unicode(username, console_encoding)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
miroslav@shop-2:~/moji/Vikipedija/pywikipedia/pywikipedia$
----------------------------------------------------------------------
Comment By: McScrewDriver (mcscrewdriver)
Date: 2012-03-07 10:08
Message:
Guys, thank you for your great help.
This is not a pywikipedia bug at all as it turns out.
I started being suspicious after seeing that cyrillic characters will not
always show properly in Gnome terminal and in Python command line.
It turns out I did not reinstall locales for my language after reinstalling
Debian some months ago. After reinstalling locales as shown here
(http://people.debian.org/~schultmc/locales.html):
1. Install debconf (i.e. run apt-get update then apt-get install
debconf, as root)
2. Run dpkg-reconfigure locales as root
and adding 3 sr locales, terminal started working correctly.
Now I still had some problems when uploading articles containing unicode
characters to sr wiki. This was fixed by editing user-config.py as shown:
# -*- coding: utf-8 -*-
family = 'wikipedia'
# The language code of the site we're working on.
mylang = 'sr'
# The dictionary usernames should contain a username for each site where
you
# have a bot account.
usernames['wikipedia']['sr'] = u'МирославЋикаБот'
log = []
console_encoding = 'utf-8'
# textfile_encoding = 'unicode_escape'
Line with unicode escape encoding must be commented out, and cyrillic chars
upload correctly from then on.
I thank you again for your help and pointers.
Miroslav
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2012-03-03 03:15
Message:
Based on the errors you get, the following is happening:
1) you have not created user-config.py manually
2) you have misconfigured your console (check the output of locale - it's
probably C or ASCII, not, say, sr_SR.utf-8)
3) you have a non-ascii username
Because of the non-ascii username, and the encoding of the console set to
ascii, it is impossible to enter it in the console. You should therefore
create user-config.py yourself, add an utf-8 header:
# -*- coding: utf-8 -*-
and enter your username there (and make sure to save the file as utf-8).
The problem should then be solved.
> "But every few months, new problems seem to crop up :) Maybe it would be
wise to use *stable* and *testing* versions of pywikipedia? "
These problems are generally due to changes in mediawiki, or changes in
configuration. This would not be solved by using a stable version. However,
you can easily get an older version from the SVN repository.
----------------------------------------------------------------------
Comment By: Bináris (binbot)
Date: 2012-03-02 14:30
Message:
I messed it up, sentence "Also, position 0" is intended to be at the end.
----------------------------------------------------------------------
Comment By: Bináris (binbot)
Date: 2012-03-02 14:29
Message:
Hi Мирослав,
I use replace.py daily on Unicode articles and at least in one wiki with
Unicode login name. The problem must be with your computer. However, I
know, character encoding is the biggest mess of informatics. Also,
"position 0:" is suspisious, I saw this when there was a BOM mark that is
not usual on Linux.
Please try to determine when the problems began and what has changed from
the time you successfully used your bot last time.
Normally version.py won't write "No user-config.py found". Please check the
chmod settings for user-config.py, path and encoding (it should be in
Unicode wothout a BOM with codin_ utf-8 in the 1st or 2nd line, that's the
best).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3496399&group_…
Bugs item #3497090, was opened at 2012-03-05 10:09
Message generated for change (Tracker Item Submitted) made by beta16
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3497090&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Luca Rabinelli (beta16)
Assigned to: Nobody/Anonymous (nobody)
Summary: add xml to weblinkchecker.py
Initial Comment:
Pywikipedia trunk/pywikipedia/ (r9951, 2012/03/01, 14:12:57)
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
It's possible to run the weblinkchecker.py with -xml parameter. Or read the externallinks.sql.gz file?
Thanks!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3497090&group_…
Bugs item #3496817, was opened at 2012-03-04 10:05
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3496817&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Paolo Benvenuto (paolobenve)
Assigned to: Nobody/Anonymous (nobody)
Summary: replace.py error reading xml file
Initial Comment:
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r9969, 2012/03/04, 15:55:41)
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5]
config-settings:
use_api = True
use_api_login = True
unicode test: triggers problem #3081100
It seems that replace.py cannot read my xml file:
$ python replace.py -ns:0 -dotall -xml:cathopedia.it.xml "1" "\1"unicode test: triggers problem #3081100
Reading XML dump...
Traceback (most recent call last):
File "/var/wwwc/cathopedia.org/pywikipedia/pagegenerators.py", line 1182, in __iter__
for page in self.wrapped_gen:
File "/var/wwwc/cathopedia.org/pywikipedia/pagegenerators.py", line 1039, in NamespaceFilterPageGenerator
for page in generator:
File "/var/wwwc/cathopedia.org/pywikipedia/pagegenerators.py", line 1084, in DuplicateFilterPageGenerator
for page in generator:
File "replace.py", line 224, in __iter__
for entry in self.parser:
File "/var/wwwc/cathopedia.org/pywikipedia/xmlreader.py", line 320, in new_parse
for rev in self._parse(event, elem):
File "/var/wwwc/cathopedia.org/pywikipedia/xmlreader.py", line 325, in _parse_only_latest
if event == "end" and elem.tag == "{%s}page" % self.uri:
AttributeError: 'XmlDump' object has no attribute 'uri'
'XmlDump' object has no attribute 'uri'
0 pages were changed.
My xml file where generated with the command
mysqldump --xml -ubackup -p***** --databases db > cathopedia.it.xml
The version is
$ mysqldump --version
mysqldump Ver 10.13 Distrib 5.1.49, for debian-linux-gnu (x86_64)
I'm wondering if I'm missing som mysqldump option, but I don't think so.
Actually, another script (add_text.py) reads the xml file without any problem, and I could use it many times
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2012-03-04 21:22
Message:
Could you upload the dump file to investigate on this bug or is it secret?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3496817&group_…
Bugs item #3496817, was opened at 2012-03-04 10:05
Message generated for change (Tracker Item Submitted) made by
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3496817&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Paolo Benvenuto ()
Assigned to: Nobody/Anonymous (nobody)
Summary: replace.py error reading xml file
Initial Comment:
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r9969, 2012/03/04, 15:55:41)
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5]
config-settings:
use_api = True
use_api_login = True
unicode test: triggers problem #3081100
It seems that replace.py cannot read my xml file:
$ python replace.py -ns:0 -dotall -xml:cathopedia.it.xml "1" "\1"unicode test: triggers problem #3081100
Reading XML dump...
Traceback (most recent call last):
File "/var/wwwc/cathopedia.org/pywikipedia/pagegenerators.py", line 1182, in __iter__
for page in self.wrapped_gen:
File "/var/wwwc/cathopedia.org/pywikipedia/pagegenerators.py", line 1039, in NamespaceFilterPageGenerator
for page in generator:
File "/var/wwwc/cathopedia.org/pywikipedia/pagegenerators.py", line 1084, in DuplicateFilterPageGenerator
for page in generator:
File "replace.py", line 224, in __iter__
for entry in self.parser:
File "/var/wwwc/cathopedia.org/pywikipedia/xmlreader.py", line 320, in new_parse
for rev in self._parse(event, elem):
File "/var/wwwc/cathopedia.org/pywikipedia/xmlreader.py", line 325, in _parse_only_latest
if event == "end" and elem.tag == "{%s}page" % self.uri:
AttributeError: 'XmlDump' object has no attribute 'uri'
'XmlDump' object has no attribute 'uri'
0 pages were changed.
My xml file where generated with the command
mysqldump --xml -ubackup -p***** --databases db > cathopedia.it.xml
The version is
$ mysqldump --version
mysqldump Ver 10.13 Distrib 5.1.49, for debian-linux-gnu (x86_64)
I'm wondering if I'm missing som mysqldump option, but I don't think so.
Actually, another script (add_text.py) reads the xml file without any problem, and I could use it many times
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3496817&group_…
Bugs item #3496550, was opened at 2012-03-03 05:32
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3496550&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: None
>Status: Closed
>Resolution: Duplicate
Priority: 5
Private: No
Submitted By: Paolo Benvenuto ()
>Assigned to: xqt (xqt)
Summary: new lines not managed correctly
Initial Comment:
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r9946, 2012/03/01, 09:52:33)
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5]
config-settings:
use_api = True
use_api_login = True
unicode test: triggers problem #3081100
Linux debian
I'm using the bot on the server itself where mediawiki is installed.
If I insert a new line with the replace.py script (e.g., with the replace string like "asdf\n"), a subsequent regex search of the same string (e.g, "asdf\n") won't match, while "asdf\r\n" will match.
It seems that when the bot must insert \n, actualy it inserts \r\n.
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2012-03-04 06:45
Message:
see #3496542
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3496550&group_…
Bugs item #3496542, was opened at 2012-03-03 04:53
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3496542&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Paolo Benvenuto ()
Assigned to: Nobody/Anonymous (nobody)
Summary: new lines not managed correctly
Initial Comment:
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r9946, 2012/03/01, 09:52:33)
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5]
config-settings:
use_api = True
use_api_login = True
unicode test: triggers problem #3081100
Linux debian
I'm using the bot on the server itself where mediawiki is installed.
If I insert a new line with the replace.py script (e.g., with the replace string like "asdf\n"), a subsequent regex search of the same string (e.g, "asdf\n") won't match, while "asdf\r\n" will match.
It seems that when the bot must insert \n, actualy it inserts \r\n.
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2012-03-03 05:50
Message:
maybe it's mediawiki who inserts. Just use "asdf\r?\n" for the regex
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3496542&group_…
Bugs item #3496550, was opened at 2012-03-03 05:32
Message generated for change (Tracker Item Submitted) made by
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3496550&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Paolo Benvenuto ()
Assigned to: Nobody/Anonymous (nobody)
Summary: new lines not managed correctly
Initial Comment:
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r9946, 2012/03/01, 09:52:33)
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5]
config-settings:
use_api = True
use_api_login = True
unicode test: triggers problem #3081100
Linux debian
I'm using the bot on the server itself where mediawiki is installed.
If I insert a new line with the replace.py script (e.g., with the replace string like "asdf\n"), a subsequent regex search of the same string (e.g, "asdf\n") won't match, while "asdf\r\n" will match.
It seems that when the bot must insert \n, actualy it inserts \r\n.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3496550&group_…
Bugs item #3496542, was opened at 2012-03-03 04:53
Message generated for change (Tracker Item Submitted) made by
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3496542&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Paolo Benvenuto ()
Assigned to: Nobody/Anonymous (nobody)
Summary: new lines not managed correctly
Initial Comment:
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r9946, 2012/03/01, 09:52:33)
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5]
config-settings:
use_api = True
use_api_login = True
unicode test: triggers problem #3081100
Linux debian
I'm using the bot on the server itself where mediawiki is installed.
If I insert a new line with the replace.py script (e.g., with the replace string like "asdf\n"), a subsequent regex search of the same string (e.g, "asdf\n") won't match, while "asdf\r\n" will match.
It seems that when the bot must insert \n, actualy it inserts \r\n.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3496542&group_…