Things go worse and worse in the last days. First SVN errors, then change of textlib.py killed my script, and the newest, when running replace.py:
WARNING: Download package "patch.exe" from http://downloads.sourceforge.net/project/gnuwin32/patch/2.5.9-7/patch-2.5.9-...
What is this? Why should I download it? Why did my bot stop, when it worked normally a few days ago? What did I harm to the world?
I forgot the detailes: c:\Pywikipedia>replace.py -search WARNING: Download package "patch.exe" from http://downloads.sourceforge.net/project/gnuwin32/patch/2.5.9-7/patch-2.5.9-... -bin.zip WARNING: Size of download: 126248 byte(s) WARNING: MIME type: ['application', 'x-zip-compressed'] WARNING: Extract package "patch.exe" to C:\Pywikipedia\externals\patch.exe. Traceback (most recent call last): File "C:\Pywikipedia\replace.py", line 171, in <module> import wikipedia as pywikibot File "C:\Pywikipedia\wikipedia.py", line 149, in <module> import externals # allow imports from externals File "C:\Pywikipedia\externals__init__.py", line 387, in <module> check_setup('patch.exe') File "C:\Pywikipedia\externals__init__.py", line 372, in check_setup if download_install(modules_needed[m][1], m, path): File "C:\Pywikipedia\externals__init__.py", line 315, in download_install arch.extractall(os.path.join(path, '__setup_tmp/')) UnboundLocalError: local variable 'arch' referenced before assignment
Output of version.py: c:\Pywikipedia>version.py WARNING: Download package "patch.exe" from http://downloads.sourceforge.net/project/gnuwin32/patch/2.5.9-7/patch-2.5.9-... -bin.zip WARNING: Size of download: 126248 byte(s) WARNING: MIME type: ['application', 'x-zip-compressed'] WARNING: Extract package "patch.exe" to C:\Pywikipedia\externals\patch.exe. local variable 'arch' referenced before assignment Serious import error; pywikibot not available - was it configured? Pywikipedia trunk/pywikipedia/ (r11712, 2013/07/05, 01:17:44, OUTDATED) Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] config-settings: use_api = True use_api_login = True unicode test: ok
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
This is the first step of the transition to a "slightly" changed externals handling. As explained in [1] and [2] "patch.exe" is needed for the win users - linux OS do usualy already include "patch".
[1] http://lists.wikimedia.org/pipermail/pywikipedia-l/2013-July/007931.html [2] http://www.mediawiki.org/w/index.php?title=Special:Code/pywikipedia/11711
The download SHOULD not take place without explicit question to the user. This was a bug and was solved in [3], please update if needed.
[3] www.mediawiki.org/wiki/Special:Code/pywikipedia/11731
The reason for all this is, that we use external code from other projects/sources, as e.g. "BeautifulSoup.py", but also others. Most of them used by 2 of my bots (subster.py and catimages.py). What I implemented is an automatic check and install system for missing dependencies in externals/__init__.py. This system is able to install exactly the version requested by us the developers and allows to apply patches to the code if needed - in order to have maximal flexibility. It can make use of the linux OS package management or directly download the code from a defined location. More up to come.
The question whether this is the best solution possible should be discussed. As I see it yes, because we do not need to fork all those projects and then maintain (update and merge) all the code all the time. I consider this as sub-optimal because of the additional workload produced. But if somebody has a good idea or can explain me how to do this properly, please step forward! I am NOT an expert, especially in git and there might be better solutions.
At the current stage just downloading of "patch.exe" for win users is activated. The next step from my side - if everybody agrees - would be to activate this system for BeautifulSoup.py for further testing. This would mean that BeautifulSoup.py would be removed from our repo and in future be automatically downloaded (after a question to the user) at the first run.
Greetings and I looking forward to all your feedback DrTrigon
On 09.07.2013 00:07, Bináris wrote:
Things go worse and worse in the last days. First SVN errors, then change of textlib.py killed my script, and the newest, when running replace.py:
WARNING: Download package "patch.exe" from http://downloads.sourceforge.net/project/gnuwin32/patch/2.5.9-7/patch-2.5.9-...
What is this? Why should I download it? Why did my bot stop, when it worked normally a few days ago? What did I harm to the world?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 10.07.2013 22:09, Dr. Trigon wrote:
...
The question whether this is the best solution possible should be discussed. As I see it yes, because we do not need to fork all those projects and then maintain (update and merge) all the code all the time. I consider this as sub-optimal because of the additional workload produced. But if somebody has a good idea or can explain me how to do this properly, please step forward! I am NOT an expert, especially in git and there might be better solutions.
Since I did not get any further feedback, disagreement nor a clear vote/reason against my plans - I would like to do the following step and change the BeautifulSoup.py handling as mentioned below.
At the current stage just downloading of "patch.exe" for win users is activated. The next step from my side - if everybody agrees - would be to activate this system for BeautifulSoup.py for further testing. This would mean that BeautifulSoup.py would be removed from our repo and in future be automatically downloaded (after a question to the user) at the first run.
Please stay tuned for news.
Greetings and Thanks to all! DrTrigon
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Implemented in r11746.
Please report errors.
Greetings
On 12.07.2013 19:12, Dr. Trigon wrote:
On 10.07.2013 22:09, Dr. Trigon wrote:
...
Please stay tuned for news.
Greetings and Thanks to all! DrTrigon
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Next time it would be nice and friendly to leave people use the core in piece who are not interested in these externals. I can't believe I am forced to run unknown exes for the sake of exotic externals in order to be able to solve basic tasks with the core.
2013/7/10 Dr. Trigon dr.trigon@surfeu.ch
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
This is the first step of the transition to a "slightly" changed externals handling. As explained in [1] and [2] "patch.exe" is needed for the win users - linux OS do usualy already include "patch".
[1] http://lists.wikimedia.org/pipermail/pywikipedia-l/2013-July/007931.html [2] http://www.mediawiki.org/w/index.php?title=Special:Code/pywikipedia/11711
The download SHOULD not take place without explicit question to the user. This was a bug and was solved in [3], please update if needed.
[3] www.mediawiki.org/wiki/Special:Code/pywikipedia/11731
The reason for all this is, that we use external code from other projects/sources, as e.g. "BeautifulSoup.py", but also others. Most of them used by 2 of my bots (subster.py and catimages.py). What I implemented is an automatic check and install system for missing dependencies in externals/__init__.py. This system is able to install exactly the version requested by us the developers and allows to apply patches to the code if needed - in order to have maximal flexibility. It can make use of the linux OS package management or directly download the code from a defined location. More up to come.
The question whether this is the best solution possible should be discussed. As I see it yes, because we do not need to fork all those projects and then maintain (update and merge) all the code all the time. I consider this as sub-optimal because of the additional workload produced. But if somebody has a good idea or can explain me how to do this properly, please step forward! I am NOT an expert, especially in git and there might be better solutions.
At the current stage just downloading of "patch.exe" for win users is activated. The next step from my side - if everybody agrees - would be to activate this system for BeautifulSoup.py for further testing. This would mean that BeautifulSoup.py would be removed from our repo and in future be automatically downloaded (after a question to the user) at the first run.
Greetings and I looking forward to all your feedback DrTrigon
On 09.07.2013 00:07, Bináris wrote:
Things go worse and worse in the last days. First SVN errors, then change of textlib.py killed my script, and the newest, when running replace.py:
WARNING: Download package "patch.exe" from
http://downloads.sourceforge.net/project/gnuwin32/patch/2.5.9-7/patch-2.5.9-...
What is this? Why should I download it? Why did my bot stop, when it worked normally a few days ago? What did I harm to the world?
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlHdv4EACgkQAXWvBxzBrDAnNACg0EPpj3Muhnq87JO3Tjx+UcvZ 014AoM3OlhKBL1Swq7JQDPBhZodUzGnn =kBBr -----END PGP SIGNATURE-----
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
On Sun, Jul 21, 2013, at 05:12 AM, Bináris wrote:
Next time it would be nice and friendly to leave people use the core in piece who are not interested in these externals. I can't believe I am forced to run unknown exes for the sake of exotic externals in order to be able to solve basic tasks with the core.
+1
2013/7/21 Bináris wikiposta@gmail.com
Next time it would be nice and friendly to leave people use the core in piece peace who are not interested in these externals.
Sorry for that.