Last modified: 2014-09-18 07:47:47 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1634/ Reported by: masti01 Created on: 2013-05-24 22:33:04 Subject: harvest template syntax error Original description: $python harvest\_template.py -cat:"Miasta Polski" File "harvest\_template.py", line 116 item.editclaim\(str\(claim\), linkedItem.getID\(\) ,refs=\{self.setSource\(self.site\(\).language\(\)\)\}\) ^ SyntaxError: invalid syntax $ python version.py 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\)\] config-settings: use\_api = True use\_api\_login = True unicode test: triggers problem \#3081100
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(self.site().language())} 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
- **Group**: confirmed --> trunk
It should be set(self.setSource(self.site().language())), shouldn't it?
reproduced, I'll work on it