[02:59:15] Hey I'm trying to import Wiktionary into MediaWiki and I'm getting this exact error: https://phabricator.wikimedia.org/T211450 [02:59:19] Is there a way around this? [03:05:14] Well there is a patch it looks like [03:05:31] You could try snd use the unstable version of mediawiki [03:06:12] Or its backported actually, so if you get 1.34 from git i think it would be fixed [03:07:27] Or wait for next stable release in 1.34 series (could be several months) [03:08:13] Err wait it doesnt fix error just gives better error message [03:08:47] https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/559948/1/includes/user/User.php shows what the change is [03:09:54] Oh I see [03:11:52] I'm mainly looking for a way to expand templates locally. Do you know offhand if there's another way to do that? [03:12:35] I'm currently running some Lua scripts from the Wiktionary dump, but I'm unable to run anything that references the `mw` library [03:15:55] If you need that in full generality than yes you need a dump [03:16:41] But if the templates dont reference other templates than you dont need a full dump [03:17:27] And if you only want some, you could try using special:export to get just the parts you want [03:17:55] velox828: if you just need the mw. Library, just install scribunto [03:18:13] And use lua from within the wiki [03:18:50] Okay, I have Scribunto installed in my local mediawiki [03:19:26] But I'm new to Lua and the Module system Scribunto makes so I'm not sure how to run my own script [03:21:26] So if you go to edit any page starting with module: (so like a page named module:test ) there will be a developer console below the edit window [03:22:09] Where you can put a line of lua and have it evaluated (like how the python or ruby interpreter works) [03:22:27] Which is a very good way to experiment with lua if new [03:24:17] velox828: https://www.mediawiki.org/wiki/Lua/Tutorial#Hands-on_Lua_scripting also provides a good first steps with making modules [03:24:31] Oh okay, thanks. I'll look at that [03:27:33] Is there a way to import the mediawiki library from command line? For example, I have extracted all the required Modules from the Wiktionary dump and put them in my local file system. Can I somehow get mediawiki into my local filesystem to run the Lua scripts from command line? [03:28:17] I'm asking because my whole parsing project is in Python, so I'm running the Lua scripts from command line using Python [03:28:59] Hmm. Maybe theough eval.php and some complex stuff [03:29:23] Or use curl to call mediawiki (web) api [03:31:22] Hmm [03:31:42] Hmm let me look that up [03:32:20] Okay. I appreciate your help [03:33:55] Unfortunately, I have to go for now. Can I ping you tomorrow? [03:51:26] oh, left just before I made the hackiest script ever to execute lua from commandline https://phabricator.wikimedia.org/P10025 [03:52:05] Maybe scribunto should have an equivalent of eval.php for lua with MW libraries loaded [03:54:23] Well maybe velox828 will look at the logs (unlikely) [03:55:17] there's also the API scribunto-console module [15:38:44] Does anyone know how to get the `mw` functions imported into local Lua files without going through MediaWiki at all? [15:39:02] Like `mw.ustring` and others