Open main menu

Extension talk:Scribunto

About this board

No Lua interpreter was given in the configuration, and no bundled binary exists for this platform.

9
194.33.77.26 (talkcontribs)

Hi. I need your help. When I try import infobox templates and Modules for my Wiki (mysite.com/wiki/Special:Import), then show this problem with Lua: "No Lua interpreter was given in the configuration, and no bundled binary exists for this platform."

Who know where is a problem? Thanks.

Legoktm (talkcontribs)

What operating system is your wiki running on? What version of MediaWiki? And did you change anything in your LocalSettings.php related to Scribunto?

194.33.77.26 (talkcontribs)

System: Windows

MediaWiki version: 1.30.1.

I added to LocaSettings.php:

$wgScribuntoUseGeSHi = true;

$wgScribuntoUseCodeEditor = true;

wfLoadExtension( 'Scribunto' );

$wgScribuntoDefaultEngine = 'luastandalone';


and also this:

wfLoadExtension( 'ParserFunctions' );

$wgPFEnableStringFunctions = true;

wfLoadExtension( 'InputBox' );

wfLoadExtension( 'TemplateData' );

$wgUseInstantCommons = true;

wfLoadExtension( 'WikiEditor' );

wfLoadExtension( 'SyntaxHighlight_GeSHi' );

wfLoadExtension( 'CodeEditor' );

$wgDefaultUserOptions['usebetatoolbar'] = 1; // user option provided by WikiEditor extension


Legoktm (talkcontribs)

Can you create a PHP script with the contents:

<?php

echo 'PHP_OS: ' . PHP_OS . "\n";
echo 'PHP_INT_SIZE: ' . PHP_INT_SIZE . "\n";

And then run it and provide the output?

194.33.77.26 (talkcontribs)

PHP_OS: FreeBSD PHP_INT_SIZE: 8

Apn (talkcontribs)

I'm encountering the same issue under FreeBSD 11.2 + PHP7.2 + MW 1.32.0.

Error message when publishing an LUA module :

[6fa1dfb4611d587e0b74a32a] /mediawiki/index.php?title=Module:Fix&action=submit Scribunto_LuaInterpreterNotFoundError from line 200 of /usr/local/www/mediawiki/extensions/Scribunto/includes/engines/LuaStandalone/LuaStandaloneEngine.php: No Lua interpreter was given in the configuration, and no bundled binary exists for this platform.

Apn (talkcontribs)

As per the source code, this extension seems to be only supported on lua5_1_5_linux_32_generic, lua5_1_5_linux_64_generic, lua5_1_5_Win32_bin, lua5_1_5_Win64_bin, lua5_1_5_mac_lion_fat_generic.

Why is FreeBSD not supported anymore ?

Apn (talkcontribs)

As expected, it's perfectly supported under FreeBSD. You can apply this patch to make it work :

184c184

< if ( PHP_OS == 'Linux' ) {

---

> if ( PHP_OS == 'Linux' || PHP_OS == 'FreeBSD' ) {

Anomie (talkcontribs)

That'll work if your FreeBSD installation is configured to run Linux binaries.

Another alternative is to compile/install Lua 5.1 natively for FreeBSD, then set $wgScribuntoEngineConf['luastandalone']['luaPath'] in your LocalSettings.php to the path to your new Lua binary.

Reply to "No Lua interpreter was given in the configuration, and no bundled binary exists for this platform."

Lua Can't Access scribunto/includes

6
Summary by Legoktm

Resolved by question asker.

70.115.156.72 (talkcontribs)

After much messing around and trying to get infoboxes to work, the imported page Template:Infobox on my wiki only gives me Lua exited with code 1. I looked into the lua error log and found this:

luastuff/luac53.exe: cannot open D:\xampp\htdocs\mywiki\extensions\Scribunto\includes: Permission denied

luastuffis my folder where I keep my lua binaries.

$wgScribuntoEngineConf['luastandalone']['luaPath'] = 'luastuff/luac53.exe';

$wgScribuntoEngineConf['luastandalone']['errorFile'] = 'luastuff/errorLog.txt';

How can I give the lua binary permissions to Scribunto/includes?

70.115.156.72 (talkcontribs)

I also have just unchecked "Read-only." on the extension folder. I am on Windows 10 with a XAMPP Apache localhost. Still not working. Do I need to force something?

70.115.156.72 (talkcontribs)

After another check, it seems like something is automatically setting the folder to read-only again. Why?

70.115.156.72 (talkcontribs)

The issue persists after I disabled UAC, restarted, and replaced Lua 5.3 with Lua 5.1.

70.115.156.72 (talkcontribs)

I fixed this a while ago by moving luastuff to the Scribunto folder.

Legoktm (talkcontribs)

Just for what it's worth, Scribunto intentionally uses lua5.1, and is not compatible with lua5.3.

Lua error in Module:Authority_control at line 779: attempt to index field 'wikibase' (a nil value).

3
Summary by Legoktm

Wikibase needed to be installed.

Jamiehutber (talkcontribs)
Dinoguy1000 (talkcontribs)
Jamiehutber (talkcontribs)

Thank you sir!


All fixed now.

Empty TemplateData and Lua script error

10
Hwgen22 (talkcontribs)

Recently, I have installed a MediaWiki instance locally on a virtual machine that I own. I have also installed VisualEditor, which is working fine.

As I and the future users of this wiki will need to insert references to document the web pages being written, I wanted to install the citation tool (https://www.mediawiki.org/wiki/VisualEditor/Citation_tool) to have something similar to what is being used on Wikipedia.

I have followed the steps carefully:

- I have installed Scribunto, ParserFunctions, Cite and TemplateData;

- I have imported some templates (e.g. Template:Cite_web) from Wikipedia, by using, respectively, the export and the import tools;

- I have specified the configuration message needed for the tool (MediaWiki:Visualeditor-cite-tool-definition.json).

When I use the VisualEditor tool, I see the "Cite" button and the different templates are listed. However, when I select any of the listed templates, no data appears (the template is empty).

In accordance with the troubleshooting part (https://www.mediawiki.org/wiki/VisualEditor/Citation_tool#Troubleshooting), I have tried to make a null edit the content of both the documentation page (e.g. Template:Cite_web) and the source page (e.g. Template:Cite_web/doc) by clicking on Edit then saving directly. This didn't help.

Also, I have tried to follow the different indications on this topic which deals with the same issue, but nothing worked so far.

This problem seems to be related to this bug (https://phabricator.wikimedia.org/T52372), however, the null edit does not resolve the issue.

The following API call is done when I try to open e.g. the web template from the Cite button:

"api.php?action=templatedata&format=json&titles=Template%3ACite web&lang=en&formatversion=2&doNotIgnoreMissingTitles=1&redirects=1"

Which results to this response:

"{

  "batchcomplete": true,

  "warnings": {

  "main": {

     "warnings": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."

  },

  "templatedata": {

     "warnings": "The parameter \"doNotIgnoreMissingTitles\" has been deprecated."

  }

  },

  "pages": {

  "23": {

     "title": "Template:Cite web",

     "notemplatedata": true,

     "params": []

  }

  }

}"

Notice that when I click on "Cite" button, I select a template (e.g. Web) and I click on "Insert" even if the template is empty, a reference number is added in the text, but I have an error linked with Lua that is displayed.

Indeed, the file Module:Citation/CS1/styles.css has the following problem:

"Script error: Lua error at line 1: unexpected symbol near '/'."

The file, which comes from Wikipedia (https://en.wikipedia.org/wiki/Module:Citation/CS1/styles.css), has not been modified. By the way, if I remove all the comments, a similar error appears with the code.

Does anyone has any clue on this issue? I really need citation tool to work before adding any content on the wiki, otherwise it will be such a pain to manually add all the references or to update the pages a posteriori.

***Configuration***

Operating system: Ubuntu 18.04.1 LTS

Server: Apache2

MediaWiki: 1.31.1 (590e94d)

PHP: 7.2.10

Lua: 5.1.5

***Extensions***

VisualEditor: 0.1.0 (13a585a) - 5/30/2018

WikiEditor: 0.5.1 (277159c) - 5/5/2018

Cite: - (20e26df) - 4/17/2018

ParserFunctions: 1.6.0 (f2c63e5) - 10/15/2018

Scribunto: both the latest version for REL1_31 and (cdf41bb) - 11/22/2018

TemplateData: 0.1.2 (0cffe4a) - 10/15/2018

Bootstrap: 1.2.3

Anomie (talkcontribs)
Hwgen22 (talkcontribs)

Hi @Anomie,

Thank you for your response. I tried what you propose, but when I try to change the model of the page to "Sanitized CSS", MediaWiki aborts, giving me the following errors:

Invalid or unsupported value for property background at line 38 character 14.

Invalid or unsupported value for property background at line 44 character 14.

Invalid or unsupported value for property background at line 49 character 14.

The content of the file is exactly the same as the one hosted on Wikipedia (https://en.wikipedia.org/wiki/Module:Citation/CS1/styles.css).

And I still have this "Script error: Lua error at line1: unexpected symbol near '/'." on the page...

Do you know what I'm doing wrong?

Anomie (talkcontribs)

On Wikimedia sites the configuration is adjusted to (rather pointlessly, IMO) allow protocol-relative URLs to Commons images. You can either add "https:" to the URLs on those lines in your copy, or copy the changed configuration to your LocalSettings.php.

You're likely still getting the error because those invalid values prevented the content model change.

Hwgen22 (talkcontribs)

Thank you very much for your quick and useful response, @Anomie!

Now, I can effectively change the model of the page.

However, templates are still missing from the menu on VisualEditor.

When I insert a citation even if the template is missing, a new reference number is added but when I click on it, I have:

"Empty citation (help)<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>".

I don't understand, as the CSS file has now the mode "Sanitized CSS".

The only thing that, visually, is different from Module:Citation/CS1 is that on my imported page, I see things like:

"<section begin=header />", "<section end=header />", etc.

But I don't think that this is the problem causing all this mess.

I really don't know what to do now...

Anomie (talkcontribs)

It sounds like your remaining problems are with VisualEditor rather than Scribunto. You may want to ask on a talk page for that extension.

Hwgen22 (talkcontribs)

Ok I will ask for more help on the VisualEditor page. Thank you again for your help!

Hwgen22 (talkcontribs)

For those who will experience the same issue as me, it seems that waiting for jobs to complete is not sufficient, as if the tasks were frozen (or it takes a very long time). Each time I tried and waited, nothing happened.

Manually executing the job tasks will resolve the problems. To do so, run "php <path_to_wiki_installation>/maintenance/runJobs.php".

Note that for each template, you will still need to make a null edit on each template (e.g. Template:Cite_web).

Jamiehutber (talkcontribs)

Thanks guys. I'm having the exact same problem. I have changed the file type to "Sanitized CSS" however I am still seeing the same error interestingly on the pages using this Module:

Blanche was born into a working-class family in post-war England, and grew up on a Council estate during the 1950s,<ref name=Interview1>Page Module:Citation/CS1/styles.css must have content model "Sanitized CSS" for TemplateStyles (current model is "Scribunto").</ref> a period he describes as 'grey and flat',<ref name=Ratspike>Page Module:Citation/CS1/styles.css must have content model "Sanitized CSS" for TemplateStyles (current model is "Scribunto").</ref> and lacking in the visual richness available to modern youth. Instead he took early inspiration from cinema, his collections of toy soldiers, and producing drawings of historic warriors on the backs of old rolls of wallpaper.<ref name=Ratspike/>

During the 1960s Blanche was exposed to art and art movements, eventually attending art college, where he entered a course on the strength of his drawings and paintings of battle scenes and prehistoric conflicts,<ref name=Ratspike/> and where he recounts that he was told he "had a romantic spirit, but it would never earn me a living, so there was no point in doing it".<ref name=Interview1/>


http://www.gwart.co.uk/John_Blanche

Jamiehutber (talkcontribs)

Ah ok, you just need to resave the page :D

Reply to "Empty TemplateData and Lua script error"

Scribunto/extension.json does not exist error

4
88.203.168.111 (talkcontribs)

I am not sure how to exactly install this thing, I use Windows 10 and the installation requires using linux commands but I skipped this part. But now I get this error:

Fatal error: Uncaught exception 'Exception' with message 'E:\xampp\htdocs\wiki/extensions/Scribunto/extension.json does not exist!' in E:\xampp\htdocs\wiki\includes\registration\ExtensionRegistry.php:106 Stack trace: #0 E:\xampp\htdocs\wiki\includes\GlobalFunctions.php(115): ExtensionRegistry->queue('E:\\xampp\\htdocs...') #1 E:\xampp\htdocs\wiki\LocalSettings.php(141): wfLoadExtension('Scribunto') #2 E:\xampp\htdocs\wiki\includes\WebStart.php(124): require_once('E:\\xampp\\htdocs...') #3 E:\xampp\htdocs\wiki\index.php(40): require('E:\\xampp\\htdocs...') #4 {main} thrown in E:\xampp\htdocs\wiki\includes\registration\ExtensionRegistry.php on line 106

I did add those:

wfLoadExtension( 'Scribunto' );

require_once "$IP/extensions/Scribunto/Scribunto.php";

$wgScribuntoDefaultEngine = 'luastandalone';

and unchecked the read only from the extension's folder, but nothing works.

The logs show the same thing as above (Fatal error)

Anomie (talkcontribs)
185.72.59.193 (talkcontribs)

It says exactly to run wfloatExtension:

Manual installation

   Download and place the file(s) in a directory called Scribunto in your extensions/ folder.

   Add the following code at the bottom of your LocalSettings.php:

   wfLoadExtension( 'Scribunto' );

   $wgScribuntoDefaultEngine = 'luastandalone';

   Set execute permissions for the Lua binaries bundled with this extension:

I have the same problem

Anomie (talkcontribs)

It didn't say that 2 years ago when this thread took place.

Reply to "Scribunto/extension.json does not exist error"

Request instaltion guide of Scribunto

1
Shadowslight (talkcontribs)

I have Scribunto on my 3thparty Wiki project instald and have only error msg, i have use the guide from Extension:Scribunto.

//Edit

I use MediaWiki 1.31.0 release and Extension:Scribunto 1.31.0

Reply to "Request instaltion guide of Scribunto"
24.142.4.209 (talkcontribs)

This extension has made using MediaWiki an absolute nightmare. Half of my pages grenade with various errors. Wiki means quick ... but I spend more time investigating this crap then working my content.

Mr. Stradivarius on tour (talkcontribs)

What are you using it to do? If it's something that doesn't require a lot of complex templates, then you can probably get away with just uninstalling it.

Leucosticte (talkcontribs)

I don't know about his particular use case, but importing content from Wikipedia and having it work on one's wiki usually requires Scribunto these days; most people won't be able to get away with just uninstalling it. It would be a real hassle to have to design infoboxes and such from scratch, and not use a scripting language.

Iowajason (talkcontribs)

Agree with Leucosticte. Transwiki requires Scibunto and extension development paradigm is wild west. Hoping key Mediawiki components return to Wiki governance and release/versioning controls at some point. Is there any kind of plan on when this extension will be managed like normal extensions? It's been a long time that this has operated outside normal protocols.

Mr. Stradivarius on tour (talkcontribs)

What do you mean by "transwiki"? I'm not aware of any transwiki methods that require Scribunto. Do you mean exporting pages with Special:Export?

Iowajason (talkcontribs)

Transwiki is the process of moving content from one Wiki to another. With the prominence that Lua now has on en.wikipedia.org, moving content (using any method), generally requires Scribunto be working on the destination (e.g. mine) Wiki.

With other extensions, one is able to match versions and have some confidence that content moved from one wiki to another will work on a similarly configured site. Currently, this is a challenge with Lua.

Mr. Stradivarius (talkcontribs)

Yes, I know what transwikiing is. :) Of course, if you're moving content from Wikipedia, then you will need Scribunto. But my point was that not everyone needs to have Wikipedia content on their own wiki. Most of the templates and modules on the English Wikipedia were never designed for portability; even before Scribunto came along transwikiing templates was considered "use at your own risk". The main difference now is that if you get an error it will show a big red "script error" message rather than failing in a less obvious way.

Another difference is that Scribunto is updated more often than MediaWiki's wikitext parser, because Scribunto is much newer. But both will continue to be updated, so there is always the risk of generating errors if you use templates or modules that depend on newer versions of MediaWiki or of Scribunto.

There has been some talk of setting up a centralised wiki or maybe a git repository for developing Lua modules on Wikimedia sites, which would probably make module developers think more about their work being reused on other sites. However, I haven't heard any updates about that recently.

Reply to "Nightmare"
Wuestenarchitekten (talkcontribs)

I was running scribunto with no issues using commit (f1a4d6c) when updating our wiki to 1.31, I attempted to also update scribunto without success. The Module-Namespace is gone for some reason. Reverting to that previous revision made the Module Namespace reappear and everything working fine.

Any hints on how I might investigate this?

Thanks

Markus

Reply to "'can't find module' error message"

The interpreter has terminated with signal "11".

6
Sanctaria (talkcontribs)

I've installed everything as per the instructions, but keep getting this error. However all info online re this error is 3+ years old, at least.

I am on a shared server, but have confirmation from my hosts that proc_open functions are available. They've said Lua should be already installed on the shared servers too.

It's the MW 1.30 version I have installed it on. I've copy-pasted the info for my Local Settings...

I'm a n00b and completely untrained and unknowledgeable when it comes to this stuff. Plz help.

Sanctaria (talkcontribs)

Ok, some playing around and now I have the error 1 message.

Checked with the host and the Lua on the shared server is 5.3.4.

So I'm buggered, really.

EDIT: This is from the error log:

/extensions/Scribunto/engines/LuaStandalone/MWServer.lua:526: attempt to call a nil value (global 'loadstring')

stack traceback:

.../extensions/Scribunto/engines/LuaStandalone/MWServer.lua:526: in function 'MWServer.unserialize'

.../extensions/Scribunto/engines/LuaStandalone/MWServer.lua:410: in function 'MWServer.receiveMessage'

.../extensions/Scribunto/engines/LuaStandalone/MWServer.lua:295: in function 'MWServer.dispatch'

.../extensions/Scribunto/engines/LuaStandalone/MWServer.lua:40: in function 'MWServer.execute'

...w/extensions/Scribunto/engines/LuaStandalone/mw_main.lua:7: in main chunk

[C]: in ?

Anomie (talkcontribs)
Checked with the host and the Lua on the shared server is 5.3.4.

Scribunto only supports 5.1 versions of Lua.

Sanctaria (talkcontribs)

Yeah, I know. Are there any plans to change this?

However I did contact my host to plead to change the version they have on it. They said no. They then said I have version 5.1.4. And when I showed them logs of them telling me earlier I have 5.3.4, they said they'd have to go check. I haven't heard from them since.

*sigh*

EDIT: Nope, nevermind, they've decided it's 5.3.4 after all >_> Definitely not going to upgrade with them after this to a VPS/dedicated.

Anomie (talkcontribs)

There are no plans to change that any time soon. See phab:T178146 and linked comments for some discussion.

Since your host has 5.3.4 installed globally and won't install a 5.1 version in parallel, it seems you're left with figuring out how to install Lua locally to your account there (assuming they don't have your local directories all mounted with "noexec" or the like). You might try figuring out why the local version distributed with Scribunto is segfaulting (that's what signal 11 typically indicates), or you might just try recompiling Lua 5.1 locally since that's probably going to turn out to be the fix in the end.

Sanctaria (talkcontribs)

Possibly. And unfortunately that's beyond my technical capabilities so I guess I'll have to finagle a friend into doing it for me.

Reply to "The interpreter has terminated with signal "11"."

Lua error in package.lua at line 80: module 'Module:Yesno' not found.

1
Jimcat1111 (talkcontribs)

I'm getting this error when using the Imbox template imported from this page (Template:Imbox). Aso in the template page itself I'm getting this other error:

Lua error in package.lua at line 80: module 'Module:Category handler/data' not found.

I have mediawiki 1.29.1 with Scribunto REL1_29.

I have exported these modules from the MediaWiki page and imported them to mine, they exist and their pages work, yet I still get these errors. This is how I exported them to import them after in my wiki's Special:Import page: https://www.mediawiki.org/wiki/Special:Export?pages=Template:Imbox%0aModule:Message_box%0aModule:Message_box/configuration%0aModule:No_globals%0aModule:Category_handler%0aModule:Yesno%0aModule:Arguments%0aModule:Category_handler/data&curonly=1&wpExportTemplates=1&wpDownload=1

Basically the problem is that the modules exist but I get an error saying they cannot be found. Any ideas on why is this happening and how to correct it?

Reply to "Lua error in package.lua at line 80: module 'Module:Yesno' not found."
Return to "Scribunto" page.