<p>As seen on <a href="https://help.openstreetmap.org/questions/64259/osm2pgsql-failed-due-to-error-failed-to-execute-lua-function" rel="nofollow">https://help.openstreetmap.org/questions/64259/osm2pgsql-failed-due-to-error-failed-to-execute-lua-function</a>:</p>
<p><a class="user-mention" data-hovercard-user-id="5311740" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/SomeoneElseOSM">@SomeoneElseOSM</a> seems to be the first one to hit this stricter check: the previous z_order calculation logic had some issue ("attempt to perform arithmetic on field 'layer' (a string value)") and the error message on osm2pgsql was easy to ignore. With the stricter check, the error message is no longer ignored, and the stylesheet needs to be fixed to use proper Lua syntax.</p>
<p>Code in question: <a href="https://github.com/SomeoneElseOSM/SomeoneElse-style/blob/master/style.lua#L16">https://github.com/SomeoneElseOSM/SomeoneElse-style/blob/master/style.lua#L16</a></p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/pull/845#issuecomment-398529869">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AD2-7skHEHM5bcfD1ZxZzsPEi2yp-HNwks5t-VtdgaJpZM4Te-pY">mute the thread</a>.<img src="https://github.com/notifications/beacon/AD2-7ke5M7ThPx2hfYxYDSHXo4HsulmWks5t-VtdgaJpZM4Te-pY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","potentialAction":{"@type":"ViewAction","target":"https://github.com/openstreetmap/osm2pgsql/pull/845#issuecomment-398529869","url":"https://github.com/openstreetmap/osm2pgsql/pull/845#issuecomment-398529869","name":"View Pull Request"},"description":"View this Pull Request on GitHub","publisher":{"@type":"Organization","name":"GitHub","url":"https://github.com"}}</script>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/osm2pgsql","title":"openstreetmap/osm2pgsql","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/osm2pgsql"}},"updates":{"snippets":[{"icon":"PERSON","message":"@mmd-osm in #845: As seen on https://help.openstreetmap.org/questions/64259/osm2pgsql-failed-due-to-error-failed-to-execute-lua-function:\r\n\r\n@SomeoneElseOSM seems to be the first one to hit this stricter check: the previous z_order calculation logic had some issue (\"attempt to perform arithmetic on field 'layer' (a string value)\") and the error message on osm2pgsql was easy to ignore. With the stricter check, the error message is no longer ignored, and the stylesheet needs to be fixed to use proper Lua syntax.\r\n \r\nCode in question: https://github.com/SomeoneElseOSM/SomeoneElse-style/blob/master/style.lua#L16"}],"action":{"name":"View Pull Request","url":"https://github.com/openstreetmap/osm2pgsql/pull/845#issuecomment-398529869"}}}</script>
<script type="application/ld+json">{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [openstreetmap/osm2pgsql] Lua function errors now trigger runtime exception (#845)",
"sections": [
{
"text": "",
"activityTitle": "**mmd**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@mmd-osm",
"facts": [
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"openstreetmap/osm2pgsql\",\n\"issueId\": 845,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/openstreetmap/osm2pgsql/pull/845#issuecomment-398529869"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 326888024\n}"
}
],
"themeColor": "26292E"
}</script>