Page MenuHomePhabricator

harvest template syntax error
Closed, ResolvedPublic


Originally from:
Reported by: masti01
Created on: 2013-05-24 22:33:04
Subject: harvest template syntax error
Original description:
$python harvest\ -cat:"Miasta Polski"
File "harvest\", line 116
item.editclaim\(str\(claim\), linkedItem.getID\(\) ,refs=\{self.setSource\(\(\).language\(\)\)\}\)
SyntaxError: invalid syntax

$ python
unicode test: triggers problem \#3081100
Pywikipedia \[http\] trunk/pywikipedia \(r11578, 2013/05/24, 17:03:42, ok\)
Python 2.6.6 \(r266:84292, Oct 12 2012, 14:23:48\)
\[GCC 4.4.6 20120305 \(Red Hat 4.4.6-4\)\]
use\_api = True
use\_api\_login = True
unicode test: triggers problem \#3081100

Version: compat-(1.0)
Severity: normal
See Also:


Related Objects


Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:22 AM
bzimport set Reference to bz55138.

I think you should update your code and run it again. beside what are you commanding is not correct. you should give more details in your command \(see help of code for detail\)

There is no syntax error in the actual (r11579) code:

import harvest_template

  • status: open --> closed-works-for-me
  • Group: --> confirmed
  • status: closed-works-for-me --> open-accepted

{self.setSource(} is allowed in python 2.7 but not in python 2.6. I think we want to keep python 2.6 compatibility, right?

What are you saying about the version of python is not correct because this is trunk branch not rewrite branch and in this branch we don't have setSource as a method of claim class, It's just a function in this code

It should be set(self.setSource(, shouldn't it?

Ladsgroup set Security to None.
Aklapper lowered the priority of this task from Medium to Lowest.Jun 5 2015, 1:41 PM
Aklapper added a subscriber: Aklapper.

Pywikibot has two versions: Compat and Core. This task was filed about the older version, called Pywikibot-compat, which is not under active development anymore. Hence I'm lowering the priority of this task to reflect the reality. Unfortunately, the Pywikibot team does not have the manpower to retest every single bug report / feature request against the (maintained) Pywikibot code base. Furthermore, the code base of Pywikibot-Compat has changed a lot compared to the code base of Pywikibot-Core so there is a chance that the problem described in this task might not exist anymore. Please help: Unfortunately manpower is limited and does not allow testing every single reported task again. If you have time and interest in Pywikibot, please upgrade to Pywikibot-Core and add a comment to this task if the problem in this task still happens in Pywikibot-Core (or directly edit the task by removing the Pywikibot-compat project and adding the Pywikibot project to this task). To learn more about Pywikibot and to get involved in its development, please check out Thank you for your understanding.

Change 277284 had a related patch set uploaded (by Xqt):
[bugfix] fix syntax error vor py 2.6

Change 277284 merged by jenkins-bot:
[bugfix] fix syntax error for py 2.6