| Vvjjkkii renamed this task from "AttributeError: 'tuple' object has no attribute 'site' when running pagefromfile.py" to "adbaaaaaaa". Vvjjkkii reopened this task as "Open". Vvjjkkii triaged this task as "High" priority. Vvjjkkii removed a subscriber: Aklapper. Vvjjkkii added projects: CheckUser, Connected-Open-Heritage-Batch-uploads (RAÄ-KMB_1_2017-02), Tamil-Sites, Gamepress, Hashtags, JADE, KartoEditor, Language-2018-Apr-June, New-Editor-Experiences, Mail, TCB-Team. Vvjjkkii updated the task description. (Show Details) |
CHANGES TO TASK DESCRIPTION
```
ERROR: AttributeError: 'tuple' object has no attribute 'site'
Traceback (most recent call last):
File "pwb.py", line 251, in <module>
if not main():
File "pwb.py", line 244, in main
run_python_file(filename, [filename] + args, argvu, file_package)
File "pwb.py", line 115, in run_python_file
main_mod.__dict__)
File ".\scripts\pagefromfile.py", line 344, in <module>
main()
File ".\scripts\pagefromfile.py", line 340, in main
bot.run()
File "C:\Users\VOJEN\Desktop\jonas\pywikibot-master\pywikibot\bot.py", line 14
70, in run
if self.skip_page(page):
File "C:\Users\VOJEN\Desktop\jonas\pywikibot-master\pywikibot\bot.py", line 16
26, in skip_page
if page.site != self.site:
AttributeError: 'tuple' object has no attribute 'site'
<class 'AttributeError'>
CRITICAL: Closing network session.
```
when trying to run
```
python pwb.py pagefromfile.py -notitle
```
valhallasw`cloud at IRC suggested: //I think it was broken in d582f9dd0a09872906abe1ba4c10074275e68a52. Can you try git checkout 31dc0fec0f4f6a1249fe094a4504d4055d664c46 and try again?//
and explained: //basically, pagefromfile.py does a weird thing where it passes a Page object /and/ content together, instead of just a Page object (which most other scripts do). Some framework code was added that requires that only the Page object is used, so that might have broken it//
He was apparently right, because checking out 31dc0fec0f4f6a1249fe094a4504d4055d664c46 bypassed the problem and the script ran fine.
26570726f6475636520796f757220627567207573696e67206120726563656e742076657273696f6e206f662074686520736f6674776172652c20746f2068652077696b6920636f6e74656e74206c616e67756167652e0a0a5468616e6b20796f752e0a546167730a436865636b557365720ad70a436f6e6e65637465642d4f70656e2d48657269746167652d42617463682d75706c6f61647320285241c42d4b4d425f315f323031372d3032290ad70a54616d696c2d53697465730ad70a47616d6570726573730ad70a48617368746167730ad70a4a4144450ad70a4b6172746f456469746f720ad70a4c616e67756167652d323031382d4170722d4a756e650ad70a4e65772d456469746f722d457870657269656e6365730ad70a4d61696c0ad70a5443422d5465616d0ad70a53756273637269626572730a4465736372697074696f6e20507265766965770a436f6e74656e77a6f6e652073657474696e6720696e20796f75722070726f66696c652c20636c69636b20746f207265636f6e63696c652e
ERROR: AttributeError: 'tuple' object has no attribute 'site'
Traceback (most recent call last):
File "pwb.py", line 251, in <module>
if not main():
File "pwb.py", line 244, in main
run_python_file(filename, [filename] + args, argvu, file_package)
File "pwb.py", line 115, in run_python_file
main_mod.__dict__)
File ".\scripts\pagefromfile.py", line 344, in <module>
main()
File ".\scripts\pagefromfile.py", line 340, in main
bot.run()
File "C:\Users\VOJEN\Desktop\jonas\pywikibot-master\pywikibot\bot.py", line 14
70, in run
if self.skip_page(page):
File "C:\Users\VOJEN\Desktop\jonas\pywikibot-master\pywikibot\bot.py", line 16
26, in skip_page
if page.site != self.site:
AttributeError: 'tuple' object has no attribute 'site'
<class 'AttributeError'>
CRITICAL: Closing network session.
```
when trying to run
```
python pwb.py pagefromfile.py -notitle
```
valhallasw`cloud at IRC suggested: //I think it was broken in d582f9dd0a09872906abe1ba4c10074275e68a52. Can you try git checkout 31dc0fec0f4f6a1249fe094a4504d4055d664c46 and try again?//
and explained: //basically, pagefromfile.py does a weird thing where it passes a Page object /and/ content together, instead of just a Page object (which most other scripts do). Some framework code was added that requires that only the Page object is used, so that might have broken it//
He was apparently right, because checking out 31dc0fec0f4f6a1249fe094a4504d4055d664c46 bypassed the problem and the script ran fine.
26570726f6475636520796f757220627567207573696e67206120726563656e742076657273696f6e206f662074686520736f6674776172652c20746f2068652077696b6920636f6e74656e74206c616e67756167652e0a0a5468616e6b20796f752e0a546167730a436865636b557365720ad70a436f6e6e65637465642d4f70656e2d48657269746167652d42617463682d75706c6f61647320285241c42d4b4d425f315f323031372d3032290ad70a54616d696c2d53697465730ad70a47616d6570726573730ad70a48617368746167730ad70a4a4144450ad70a4b6172746f456469746f720ad70a4c616e67756167652d323031382d4170722d4a756e650ad70a4e65772d456469746f722d457870657269656e6365730ad70a4d61696c0ad70a5443422d5465616d0ad70a53756273637269626572730a4465736372697074696f6e20507265766965770a436f6e74656e77a6f6e652073657474696e6720696e20796f75722070726f66696c652c20636c69636b20746f207265636f6e63696c652e
TASK DETAIL
EMAIL PREFERENCES
To: Vvjjkkii
Cc: Xqt, Wesalius, pywikibot-bugs-list, AndyTan, Zylc, 1978Gage2001, herron, pan199312, Chicocvenancio, alanajjar, Magul, Tbscho, MayS, Lea_WMDE, Mattias_Ostmar-WMSE, Mdupont, JJMC89, Jseddon, Ryuch, Mkdw, RuyP, Avicennasis, JEumerus, Trizek-WMF, KasiaWMDE, 0x010C, srodlund, Luke081515, grin, Bsadowski1, mys_721tx, Snowolf, Huji, Gryllida, jayvdb, Dalba, Tobi_WMDE_SW, Masti, revi, scfc, Alchimista, He7d3r, Romaine, Mbch331, Rxy, Jay8g, Glaisher, Krenair, chasemp, Aklapper
Cc: Xqt, Wesalius, pywikibot-bugs-list, AndyTan, Zylc, 1978Gage2001, herron, pan199312, Chicocvenancio, alanajjar, Magul, Tbscho, MayS, Lea_WMDE, Mattias_Ostmar-WMSE, Mdupont, JJMC89, Jseddon, Ryuch, Mkdw, RuyP, Avicennasis, JEumerus, Trizek-WMF, KasiaWMDE, 0x010C, srodlund, Luke081515, grin, Bsadowski1, mys_721tx, Snowolf, Huji, Gryllida, jayvdb, Dalba, Tobi_WMDE_SW, Masti, revi, scfc, Alchimista, He7d3r, Romaine, Mbch331, Rxy, Jay8g, Glaisher, Krenair, chasemp, Aklapper
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
