[00:32:03] What could the cause of a FileNotFound error be, if the file that can't be found is in the same directory? [00:32:36] Oy gevalt... [00:33:16] what? [00:33:18] paste the full error [00:33:47] I figured it out shortly thereafter. [00:34:01] It's not the code that's dumb, it's the user. And I'm p. dumb! [00:34:40] (03PS1) 10Tim Landscheidt: Remove rmtool [labs/toollabs] - 10https://gerrit.wikimedia.org/r/239522 [00:39:14] Can anyone here who does Python comment on whether or not `code_returned=subprocess.check_output(["python", "Blog_Importer.py", data], universal_newlines=False)` is funky?) [00:42:26] Luke081515|away: in what way? [00:43:07] Wikimedia Labs | Status: Up | Channel is logged: http://bots.wmflabs.org/~wm-bot/logs/%23wikimedia-labs/ [00:43:16] whoops [00:47:32] ResMar: very funky. why not import it and call a function? [00:50:27] Earwig: I wrote these Python scripts as scripts, first. [00:50:34] Now I'm trying to get them to run on the web. [00:50:46] If I can call them as executables from within Python I only need to change one line at the end of the files. [00:50:59] understood, but you should change it [00:51:20] it shouldn't require too much - just wrap your main code in a function if it's not in one already [00:51:34] there is no advantage for spawning a new process that way - it's a waste of resources [00:51:58] How do I pass arguments that would otherwise have been passed via the parser? [00:52:34] have your script's main function take arguments - that's the most common way. you can also set sys.argv if you don't want to change stuff, but that's also funky [00:53:22] Yeah I don't like it. I don't want to have to maintain six files instead of three. [00:53:30] why would you? [00:53:39] let me see your code [00:53:47] Sure. [00:53:56] https://github.com/ResidentMario [00:55:07] give me a minute [01:00:42] ResMar: https://github.com/ResidentMario/Blog_Importer/pull/1 [01:00:46] untested, but it should work [01:01:01] try to understand what I did [01:01:31] oh wait, actually, I shouldn't have indented that HTML [01:02:15] you can fix that yourself [01:02:35] lines 41-54 should be unindented [01:02:58] I know, I see it. [01:02:59] Hmm. [01:03:31] I kind of see what you did there. [01:03:49] Can you do something similar for FC_Importer? That's the big one. [01:03:53] alright... [01:04:00] You'd need, uh, an indent tool or something to indent all of that cod. [01:04:02] code* [01:04:32] I know Eclipse had something like that back when I had the patience for Eclipse... [01:04:33] yes... command+] [01:04:39] well, I use sublime text [01:04:51] So do I. That's something Sublime can do? Nice. [01:05:57] er, it's already in functions [01:06:02] we don't need to indent anything [01:06:24] well, we can factor out one function [01:07:00] is setGOPage the only thing handling an argument? [01:07:15] oh dear, it's using a global [01:09:39] Earwig: The change you made sort of works but also sort of doesn't. [01:09:45] explain [01:10:19] So I'm working in a local environment on my machine. [01:10:34] The trouble is that I haven't figured out how to get pywikibot to play nice with, well, anything. [01:10:56] I spent a few hours with another user trying very, very hard to get pywikibot to work globally, but failed, ultimately. [01:11:09] So when I run the scripts I run them outside of the folder in which I have pywikibot installed. [01:11:44] So I can't run this code locally, but it might run, using Legotkm's hack, online. [01:12:19] so wait, does that have to do with my change, or just that you can't test it? [01:12:26] I'm not clear [01:12:51] The file imports a self-written library called signpostlib [01:12:56] signpostlib imports pywikibot [01:13:24] Which is also unclear. [01:14:38] But the gist of it is that I need to rewrite the file so that it does not use pywikibot at all. Specifically, signpostlib implements a wrapper of a pywikibot page-getting function that I use everywhere. [01:14:50] uh huh [01:15:23] If I code the application so that it returns the wikicode, instead of trying to commit it on-wiki, pywikibot isn't strictly necessary. [01:16:40] But that still means I need to rewrite it, which is my fault, not yours. I didn't realize it was dependent on pywikibot. [01:17:19] pywikibot doesn't install to a virtualenv or something? [01:17:48] I can't get it to work on my local machine. Maybe someone better than I could but I've wasted enough time trying. [01:17:55] Basically yeah. [01:18:14] core or compat? [01:18:58] I think I have core? [01:19:46] Anyway it's more effort than it's worth. It's frustrating but if I wanted to get this stuff to work online, particularly that FC_Importer, I'm more and more sure that it'd take too much work to be worthwhile. [01:19:58] I can run it locally fine...don't expect anyone else at the Signpost to be able to, though. [01:20:04] Thanks for the help though. [01:20:41] hmm [01:20:50] so no change necessary for FC_Importer then? [01:21:01] Yeah, never mind it. [01:21:04] alrighty then [01:21:08] * Earwig rm -rf's [01:21:22] What did you say about globals btw? [01:21:52] you are using 'target' as a global rather than an argument to the relevant functions [01:21:58] I think there might be another global in there [01:22:47] The code is really hodgepodge. [01:23:12] I discovered a lot of difficulties I hadn't thought of beforehand whilst writing it. [01:23:48] I collected some of the subfunctions I ended up writing in signpostlib, but a lot of early effort material was still hanging around by virtue of being too hard to remove. [01:24:14] understood. first attempts often suffer from that [01:24:22] having it work is more important :P [01:24:33] Yeah if I was a perfectionist I'd totally rewrite the damn thing haha. [01:48:34] (03PS1) 10Greg Grossmeier: Add releng-(.*) to catch all releng planning tags [labs/tools/wikibugs2] - 10https://gerrit.wikimedia.org/r/239528 [02:09:39] (03CR) 10Yuvipanda: [C: 032] Remove rmtool [labs/toollabs] - 10https://gerrit.wikimedia.org/r/239522 (owner: 10Tim Landscheidt) [03:03:56] Change on 12www.mediawiki.org a page OAuth was modified, changed by RobLa-WMF link https://www.mediawiki.org/w/index.php?diff=1889161 edit summary: Updates [03:31:02] Change on 12www.mediawiki.org a page OAuth was modified, changed by Shirayuki link https://www.mediawiki.org/w/index.php?diff=1889177 edit summary: translation tweaks [03:31:17] Change on 12www.mediawiki.org a page OAuth was modified, changed by Shirayuki link https://www.mediawiki.org/w/index.php?diff=1889178 edit summary: Marked this version for translation [03:31:21] Change on 12www.mediawiki.org a page OAuth/en was created, changed by FuzzyBot link https://www.mediawiki.org/wiki/OAuth/en edit summary: Importing a new version from external source [03:32:31] Change on 12www.mediawiki.org a page OAuth was modified, changed by Shirayuki link https://www.mediawiki.org/w/index.php?diff=1889186 edit summary: dummy edit to update translation pages [03:32:56] Change on 12www.mediawiki.org a page OAuth/ca was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889191 edit summary: Updating to match new version of source page [03:32:56] Change on 12www.mediawiki.org a page OAuth/de was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889190 edit summary: Updating to match new version of source page [03:32:56] Change on 12www.mediawiki.org a page OAuth/ms was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889194 edit summary: Updating to match new version of source page [03:32:56] Change on 12www.mediawiki.org a page OAuth/it was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889193 edit summary: Updating to match new version of source page [03:32:56] Change on 12www.mediawiki.org a page OAuth/es was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889200 edit summary: Updating to match new version of source page [03:32:56] Change on 12www.mediawiki.org a page OAuth/fr was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889199 edit summary: Updating to match new version of source page [03:32:56] Change on 12www.mediawiki.org a page OAuth/ja was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889198 edit summary: Updating to match new version of source page [03:32:56] Change on 12www.mediawiki.org a page OAuth/pt was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889196 edit summary: Updating to match new version of source page [03:32:56] Change on 12www.mediawiki.org a page OAuth/pl was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889197 edit summary: Updating to match new version of source page [03:32:56] Change on 12www.mediawiki.org a page OAuth/pt-br was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889201 edit summary: Updating to match new version of source page [03:32:58] Change on 12www.mediawiki.org a page OAuth/en was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889187 edit summary: Importing a new version from external source [03:34:25] Change on 12www.mediawiki.org a page OAuth was modified, changed by Shirayuki link https://www.mediawiki.org/w/index.php?diff=1889202 edit summary: [03:35:03] Change on 12www.mediawiki.org a page OAuth/it was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889205 edit summary: Updating to match new version of source page [03:35:03] Change on 12www.mediawiki.org a page OAuth/de was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889204 edit summary: Updating to match new version of source page [03:35:03] Change on 12www.mediawiki.org a page OAuth/ca was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889203 edit summary: Updating to match new version of source page [03:35:03] Change on 12www.mediawiki.org a page OAuth/pt was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889207 edit summary: Updating to match new version of source page [03:35:03] Change on 12www.mediawiki.org a page OAuth/ms was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889206 edit summary: Updating to match new version of source page [03:35:03] Change on 12www.mediawiki.org a page OAuth/fr was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889212 edit summary: Updating to match new version of source page [03:35:03] Change on 12www.mediawiki.org a page OAuth/es was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889211 edit summary: Updating to match new version of source page [03:35:03] Change on 12www.mediawiki.org a page OAuth/pt-br was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889219 edit summary: Updating to match new version of source page [03:35:03] Change on 12www.mediawiki.org a page OAuth/pl was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889218 edit summary: Updating to match new version of source page [03:35:03] Change on 12www.mediawiki.org a page OAuth/ja was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889214 edit summary: Updating to match new version of source page [03:35:05] Change on 12www.mediawiki.org a page OAuth/en was modified, changed by FuzzyBot link https://www.mediawiki.org/w/index.php?diff=1889208 edit summary: Importing a new version from external source [04:36:54] Why is this channel watching that page? [04:38:11] (03CR) 10Legoktm: [C: 032] "Lowercase projects are a bit weird, but OK..." [labs/tools/wikibugs2] - 10https://gerrit.wikimedia.org/r/239528 (owner: 10Greg Grossmeier) [04:38:26] (03Merged) 10jenkins-bot: Add releng-(.*) to catch all releng planning tags [labs/tools/wikibugs2] - 10https://gerrit.wikimedia.org/r/239528 (owner: 10Greg Grossmeier) [05:02:33] !log tools.wikibugs Updated channels.yaml to: 4d6ce23148a4fa57c84139465beeb84361ebb6de Add releng-(.*) to catch all releng planning tags [05:02:38] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools.wikibugs/SAL, Master [07:11:52] 10Wikibugs, 5Patch-For-Review: wikibugs - throttle output, don't get kicked for flooding - https://phabricator.wikimedia.org/T112032#1655558 (10Legoktm) On Sept 17 (PDT): [06:55:14] <-- wikibugs (tools.wiki@wikimedia/bot/pywikibugs) has quit (Excess Flood) :| [09:52:01] PROBLEM - Puppet staleness on tools-webgrid-lighttpd-1402 is CRITICAL: CRITICAL: 100.00% of data above the critical threshold [43200.0] [10:07:05] RECOVERY - Puppet staleness on tools-webgrid-lighttpd-1402 is OK: OK: Less than 1.00% above the threshold [3600.0] [19:51:36] If Damianz still isn't around, can an op restart cluebot_redis_relay as it has been down since it got lost in migration.