[00:03:36] so... it's not an ordinary comment. it's not just a comment. (re @wmtelegram_bot: it is a comment, it's just a comment that is interpreted by the shell) [00:38:53] "Are imaginary numbers numbers?" - programming edition :P [13:19:24] Cross-sharing this again from Help:Toolforge/Jobs_framework's talk page. [13:19:24] [13:19:26] I'm running: [13:19:27] [13:19:29] toolforge jobs run myjob --command "$HOME/pwbvenv/bin/pwb replace -log -ns:0 -transcludes:Moduli:Citation/CS1 -fix:Gjuhë -fix:Data -always" --image python3.11 [13:19:30] [13:19:32] The job fails with this message: [13:19:33] [13:19:35] ERROR: replace.py not found! Misspelling? [13:19:36] [13:19:38] What could I be doing wrong? [15:19:38] Klein: I'm not a pywikibot expert but this phab task has a similar error and some possible fixes T324287 [15:19:40] T324287: pwb console script doesn't find scripts in the scripts folder but pwb.py does - https://phabricator.wikimedia.org/T324287 [15:44:34] I had the same problem, i overcame it by moving replace.py to the main folder as well user-fixes. (re @Klein: Cross-sharing this again from Help:Toolforge/Jobs_framework's talk page. [15:44:35] [15:44:36] I'm running: [15:44:38] [15:44:39] toolforge jobs run myjob --command "$HOM...) [15:44:59] I haven't tried this but seems like this is the only solution for now. I will give it a try soon (re @wmtelegram_bot: T324287: pwb console script doesn't find scripts in the scripts folder but pwb.py does - https://phabricator.wikimedi...) [16:45:00] Gave it a try using pwb.py doesn't work (re @A: I haven't tried this but seems like this is the only solution for now. I will give it a try soon) [16:59:45] If there's a lovely admin around, can someone restart the Sal tool [17:08:36] !log tools.sal restart to fix 5xx errors [17:08:40] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools.sal/SAL [17:11:13] Thanks whoever that was [17:11:17] And merry Christmas [17:37:07] Hmm... The task seems ongoing for a while on Phabricator. [17:37:08] [17:37:09] A, can you share some more details on what you mean when you say moving them to the main folder? What exactly did you do? [17:45:38] I use WinSCP to upload my files to the main folder which is "$HOME" (re @Klein: Hmm... The task seems ongoing for a while on Phabricator. [17:45:39] [17:45:41] A, can you share some more details on what you mean when you say movi...) [17:48:01] I sent you screenshot of how my "$HOME" folders look like. As you can see there the scripts I'm using are there. If i want to use another pywikibot script i just copy it from pywikibot-core scripts and paste it on "$HOME" [17:54:32] tools.balyozbot@tools-sgebastion-10:~$ toolforge jobs run testreplace --command "$HOME/pwbvenv/bin/pwb replace -fix:'dat [17:54:33] a' -lang:ku -family:wikipedia -always -recentchanges" --image python3.11 [17:54:35] [17:54:36] [17:54:38] This command logged "ERROR: replace.py not found! Misspelling?" since there is no replace.py on "$HOME" as you see in the screenshot [17:54:43] Oh... I see... You saw it. Thank you! Responding here for continuity. I've never tried this method before. All my work with my bot has been done through the terminal without coping anything locally. Not that I'm against, just didn't know of it, if that makes sense. [17:56:11] New estimate by chatgpt based on analysis of 10 out of 600k documents is total size 1.7TB database size. [17:56:12] The content is CC0 and highly valuable for tools like Luthor that helps find example sentences for lexemes. (re @dpriskorn: Hi, I have a question regarding toolforge [17:56:14] I would like to host a big sql or nosql database and API [17:56:15] Size >10GB probably. [17:56:17] [17:56:18] I'm pla...) [18:00:08] I think this was not intentional. There must be something wrong with the pwb_venv.sh which we copied from here. So until someone finds a fix for this, we have to keep copying [18:00:08] [18:00:09] https://wikitech.wikimedia.org/wiki/Help:Toolforge/Running_Pywikibot_scripts_(advanced)#Installation_and_setup (re @Klein: Oh... I see... Yes, saw it. Thank you! Responding here for continuity. I've never tried this method before. All my work with my ...) [18:04:49] @bd808, pinging BD into this as they maybe might be interested in knowing about this issue and the supposed solution (saying supposed as I've yet to try anything myself). [18:15:36] you shouldn't need to copy scripts. the pwb entrypoint doesn't work for most scripts (only the ones in pywikibot-core/pywikibot/scripts, not pywikibot-core/scripts). in the command, replace `$HOME/pwbvenv/bin/pwb` with `$HOME/pywikibot-core/pwb.py` pwb.py is the documented (https://doc.wikimedia.org/pywikibot/stable/scripts_ref/scripts.html) way to use the scripts. [18:16:30] I think i tried this and it didn't work. Let me check (re @wmtelegram_bot: you shouldn't need to copy scripts. the pwb entrypoint doesn't work for most scripts (only the ones in pywikibot-core/p...) [18:20:23] alternatively, `$HOME/pywikibot-core/scripts/replace.py` should work [18:20:33] @JJMC89 I tried it with my categorize.py so it didn't work. But it wont work for replace.py as well because the content of pywikibot-core/pywikibot/scripts is only login.py generate_user_files.py and a few other script but there is no replace.py or another scripts that someone might want to use [18:26:02] I tried it like this but it errs [18:26:03] toolforge jobs run testreplace --command "$HOME/pywikibot-core/scripts replace.py -fix:'testfix' -lang:ku -family:wikipedia -always -page:'Wikipedia:ceribandin'" --image python3.11 [18:26:05] [18:26:06] /bin/sh: 1: /data/project/balyozbot/pywikibot-core/scripts: Permission denied (re @wmtelegram_bot: alternatively, `$HOME/pywikibot-core/scripts/replace.py` should work) [18:26:35] unless you've set `user_script_paths` in user-config.py, pwb.py isn't expected to work for scripts outsidte of specific directories. [18:27:03] you have a space where there shouldbe a / [18:28:33] toolforge jobs run testreplace --command "$HOME/pywikibot-core/scripts/replace.py [18:28:33] -fix:'testfix' -lang:ku -family:wikipedia -always -page:'Wikipedia:ceribandin'" --image python3.11 [18:28:35] [18:28:36] okay but this [18:28:38] Traceback (most recent call last): [18:28:39] File "/data/project/balyozbot/pywikibot-core/scripts/replace.py", line 155, in [18:28:41] import pywikibot [18:28:42] ModuleNotFoundError: No module named 'pywikibot' [18:29:07] oh, right [18:30:12] `source pwbvenv/bin/activate && $HOME/pywikibot-core/scripts/replace.py ...` [18:33:38] That's not descriptive. I will stick with copying files because it works :D [18:44:56] @JJMC89 Should we add a line to the guide below regarding this issue and copying the needed files into $HOME is a possible solution for the time being [18:44:57] https://wikitech.wikimedia.org/wiki/Help:Toolforge/Running_Pywikibot_scripts_(advanced) [18:46:32] no [18:46:37] that is not recommended [18:51:52] i have updated the example of running a script though to use pwb.py [19:30:35] I like using the full path to the python interpreter inside the venv rather that the semi-magical $PATH changes from sourcing the` activate `script.` $HOME/pwbenv/bin/python3 …`