Last modified: 2014-09-18 07:47:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57138, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55138 - harvest template syntax error
harvest template syntax error
Status: NEW
Product: Pywikibot
Classification: Unclassified
Wikidata (Other open bugs)
compat-(1.0)
All All
: Normal normal
: ---
Assigned To: Amir Ladsgroup
:
Depends on:
Blocks: py26
  Show dependency treegraph
 
Reported: 2013-10-05 04:30 UTC by Kunal Mehta (Legoktm)
Modified: 2014-09-18 07:47 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kunal Mehta (Legoktm) 2013-10-05 04:30:40 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
Comment 1 Kunal Mehta (Legoktm) 2013-10-05 04:30:42 UTC
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\)
Comment 2 Kunal Mehta (Legoktm) 2013-10-05 04:30:44 UTC
There is no syntax error in the actual (r11579) code:

>>> import harvest_template
>>>
Comment 3 Kunal Mehta (Legoktm) 2013-10-05 04:30:45 UTC
- **status**: open --> closed-works-for-me
- **Group**:  --> confirmed
Comment 4 Kunal Mehta (Legoktm) 2013-10-05 04:30:47 UTC
- **status**: closed-works-for-me --> open-accepted
Comment 5 Kunal Mehta (Legoktm) 2013-10-05 04:30:49 UTC
{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?
Comment 6 Kunal Mehta (Legoktm) 2013-10-05 04:30:51 UTC
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
Comment 7 Kunal Mehta (Legoktm) 2013-10-05 04:30:52 UTC
- **Group**: confirmed --> trunk
Comment 8 Ricordisamoa 2014-06-05 21:28:38 UTC
It should be set(self.setSource(self.site().language())), shouldn't it?
Comment 9 Amir Ladsgroup 2014-07-24 09:04:22 UTC
reproduced, I'll work on it

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links