POSA-14
POSA-14 copied to clipboard
Update Assignment-Description.txt
Fixing a typo ("the" appears twice in the text).
Yes please. You can put them on Dropbox or SWITCHDrive and post links to them here.
Hi Marion,
Please send a copy of a file that makes problems!
Greetings from Riga Lukas
Von meinem iPhone gesendet
Am 18.05.2017 um 15:42 schrieb Benjamin Geer <[email protected]mailto:[email protected]>:
Yes please. You can put them on Dropbox or SWITCHDrivehttps://www.switch.ch/drive/ and post links to them here.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/dhlab-basel/Sipi/issues/161#issuecomment-302392351, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFN9zPywbOrIOTqFRcGYXE5t5jpJt-xrks5r7DzMgaJpZM4NfKvL.
https://drive.switch.ch/index.php/s/FUa0Q9xbAN4FVDZ https://drive.switch.ch/index.php/s/eewqBm0NJZEHM8x
Thanks!
Currently, most of this project's images get the same "call to Sipi failed" error. If you could find some time to have a look at it, that would be nice :-)
I'm looking at it right this afternoon... Lukas
Von meinem iPad gesendet
Am 01.06.2017 um 13:05 schrieb Marion Rivoal <[email protected]mailto:[email protected]>:
Currently, most of this project's images get the same "call to Sipi failed" error. If you could find some time to have a look at it, that would be nice :-)
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://github.com/dhlab-basel/Sipi/issues/161#issuecomment-305461927, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFN9zGc1Hn5cXGmdcUWzV1tuzqKOvC1dks5r_prsgaJpZM4NfKvL.
I would love to have an update on this issue :-)
Back again. Does the current Sipi improvement #170 fix this issue? If not, I just want to let you know that it is quite pressing because we can't go productive with a project unless this is fix. We can't either import their data because lots of their images have apparently the same problem.
PS: I have update the switchdrive links above, they were broken.
Will look at it this afternoon! Sorry that it took so long.... Lukas
Von meinem iPad gesendet
Am 20.06.2017 um 10:54 schrieb Marion Rivoal <[email protected]mailto:[email protected]>:
Back again. Does the current Sipi improvement #170https://github.com/dhlab-basel/Sipi/pull/170 fix this issue? If not, I just want to let you know that it is quite pressing because we can't go productive with a project unless this is fix. We can't either import their data because lots of their images have apparently the same problem.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://github.com/dhlab-basel/Sipi/issues/161#issuecomment-309689021, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFN9zBRrF4F7Tbwlk4K0_k6AHyXrDP3Vks5sF4jPgaJpZM4NfKvL.
@mrivoal Lukas tested this with #170, which I've just merged, and said it worked for him. Could you please test again now with the develop
branch?
Yes, I will and let you know. Thanks.
After updating our test platform, "it" still fails, see logs below. Our test platform accesses sipi trough knora:
- is there more to do to make it compatible with Knora?
- do you want to split issues?
Sipi Version 1.0 Beta (build 2017-06-21 06:46)
Sipi Source Git-Version: a23cf93
Sipi: Sipi Version 1.0 Beta (build 2017-06-21 06:46)
Sipi: Sipi Source Git-Version: a23cf93
Sipi: Sipi server starting
Sipi: Serving images from /run/images
Sipi: Starting shttps server with 80 threads
Sipi: Added route /make_thumbnail with script ./scripts/make_thumbnail.lua
Sipi: Added route /convert_from_binaries with script ./scripts/convert_from_binaries.lua
Sipi: Added route /convert_from_file with script ./scripts/convert_from_file.lua
Sipi: Added route /Knora_login with script ./scripts/Knora_login.lua
Sipi: Added route /Knora_logout with script ./scripts/Knora_logout.lua
Sipi: Server listening on port 1024
Sipi: Accepted connection from 172.18.0.4
Sipi: Accepted connection from 172.18.0.4
Sipi: ScriptHandler: error executing lua script: Error at [/Sipi/shttps/LuaServer.cpp: 2699]: LuaServer::executeChunk failed: [string "--..."]:133: attempt to concatenate a boolean value (local 'result')
This seems to be a lua-script problem, not a intrinsic Sipi problem (that is not a file format conversion error, but something wrong witn the script doing the upload. I'll have a look at it with Tobias @tschweizer)
Sent from my iPad
On 21 Jun 2017, at 09:40, Loïc Jaouen <[email protected]mailto:[email protected]> wrote:
After updating our test platform, "it" still fails, see logs below. Our test platform accesses sipi trough knora:
- is there more to do to make it compatible with Knora?
- do you want to split issues?
Sipi Version 1.0 Beta (build 2017-06-21 06:46) Sipi Source Git-Version: a23cf93 Sipi: Sipi Version 1.0 Beta (build 2017-06-21 06:46) Sipi: Sipi Source Git-Version: a23cf93 Sipi: Sipi server starting Sipi: Serving images from /run/images Sipi: Starting shttps server with 80 threads Sipi: Added route /make_thumbnail with script ./scripts/make_thumbnail.lua Sipi: Added route /convert_from_binaries with script ./scripts/convert_from_binaries.lua Sipi: Added route /convert_from_file with script ./scripts/convert_from_file.lua Sipi: Added route /Knora_login with script ./scripts/Knora_login.lua Sipi: Added route /Knora_logout with script ./scripts/Knora_logout.lua Sipi: Server listening on port 1024 Sipi: Accepted connection from 172.18.0.4 Sipi: Accepted connection from 172.18.0.4 Sipi: ScriptHandler: error executing lua script: Error at [/Sipi/shttps/LuaServer.cpp: 2699]: LuaServer::executeChunk failed: [string "--..."]:133: attempt to concatenate a boolean value (local 'result')
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://github.com/dhlab-basel/Sipi/issues/161#issuecomment-309989931, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFN9zAQGpmb3DEDis6nVqaddarXW5LnMks5sGMjOgaJpZM4NfKvL.
There is a fix on the way in PR #174.
@loicjaouen Just to let you know, as part of #174, I'm trying to get the webapi
integration test working again. At some point in time, I started to get the same ScriptHandler
error. After @lrosenth extended this error message to include the piece of lua code wich was causing the problem, the error stopped showing up. I will keep you posted.
@loicjaouen is there still a problem?
@subotic : let me test right now; on which branch should I test?
right, #174 has been merged, I grab develop
and let you know in a short while.
Yes, there is still a problem :(
Sipi Version 1.0 Beta (build 2017-06-30 12:50)
Sipi Source Git-Version: a82a370
Sipi: Sipi Version 1.0 Beta (build 2017-06-30 12:50)
Sipi: Sipi Source Git-Version: a82a370
Sipi: Sipi server starting
Sipi: Serving images from /run/images
Sipi: Starting shttps server with 80 threads
Sipi: Added route /make_thumbnail with script ./scripts/make_thumbnail.lua
Sipi: Added route /convert_from_binaries with script ./scripts/convert_from_binaries.lua
Sipi: Added route /convert_from_file with script ./scripts/convert_from_file.lua
Sipi: Added route /Knora_login with script ./scripts/Knora_login.lua
Sipi: Added route /Knora_logout with script ./scripts/Knora_logout.lua
Sipi: Server listening on port 1024
Sipi: Accepted connection from 172.18.0.4
Sipi: Accepted connection from 172.18.0.4
Sipi: Accepted connection from 172.18.0.4
Sipi: Accepted connection from 172.18.0.4
Sipi: Accepted connection from 172.18.0.4
Sipi: Nothing found in cache, reading and transforming file...
Sipi: Accepted connection from 172.18.0.4
Sipi: ScriptHandler: error executing lua script: Error at [/Sipi/shttps/LuaServer.cpp: 2736]: LuaServer::executeChunk failed: [string "--..."]:151: attempt to concatenate a boolean value (local 'result'), scriptname: ./scripts/make_thumbnail.lua
According to the error output, the make_thumbnail.lua
at line 151 is causing the error.
This would be this bit of code:
local success, result = thumbImg:write(thumbsDir .. thumbName)
if not success then
send_error(500, "Couldn't create thumbnail: " .. result)
return -1
end
Basically, the send_error method has a bug. It fails to send back the error because result
is not a string. You could try to wrap result
in something like this: tostring(result)
.
But why the writing of the thumbnail failed, I don't know. You could add this line before the send_error line, so see better what is happening:
server.log("thumbnail path: " .. thumbsDir .. thumbName, server.loglevel.LOG_ERR)
and then check if there is maybe a file with the same name there or that the path exists.
These changes are also in PR #186 if you would like to try them out.
thanks @subotic, here is the result:
Sipi Version 1.0 Beta (build 2017-07-03 10:59)
Sipi Source Git-Version: 6965722
Sipi: Sipi Version 1.0 Beta (build 2017-07-03 10:59)
Sipi: Sipi Source Git-Version: 6965722
Sipi: Sipi server starting
Sipi: Serving images from /run/images
Sipi: Starting shttps server with 80 threads
Sipi: Added route /make_thumbnail with script ./scripts/make_thumbnail.lua
Sipi: Added route /convert_from_binaries with script ./scripts/convert_from_binaries.lua
Sipi: Added route /convert_from_file with script ./scripts/convert_from_file.lua
Sipi: Added route /Knora_login with script ./scripts/Knora_login.lua
Sipi: Added route /Knora_logout with script ./scripts/Knora_logout.lua
Sipi: Server listening on port 1024
Sipi: Accepted connection from 172.18.0.4
Sipi: Accepted connection from 172.18.0.4
Sipi: Accepted connection from 172.18.0.4
Sipi: Accepted connection from 172.18.0.4
Sipi: Accepted connection from 172.18.0.4
Sipi: Accepted connection from 172.18.0.4
Sipi: Nothing found in cache, reading and transforming file...
Sipi: Accepted connection from 172.18.0.4
Sipi: ScriptHandler: error executing lua script: Error at [/Sipi/shttps/LuaServer.cpp: 2736]: LuaServer::executeChunk failed: [string "--..."]:151: attempt to concatenate a boolean value (local 'thumbName'), scriptname: ./scripts/make_thumbnail.lua
Apparently, all variables that are concatenated to the string should be stringified as you did for result
(tostring(result)
) on line:
local errorMsg = "Couldn't create thumbnail for path: " .. thumbsDir .. thumbName .. ", result: " .. tostring(result)
strange. thumbName
is already a string.
I have added a small change to the PR. now the thumbnail path should be printed out in the sipi log before the offending line. you need to set the level to debug
in your sipi config, or you wan't see the debug output.
--
-- loglevel, one of "EMERGENCY", "ALERT", "CRITICAL", "ERROR", "WARNING", "NOTICE", "INFORMATIONAL", "DEBUG"
--
loglevel = "DEBUG",
Jul 4 09:13:09 Sipi[35206] <Info>: Accepted connection from 127.0.0.1
Jul 4 09:13:11 Sipi[35206] <Debug>: get_size: img_w=3492 img_h=2404 w=128 h=89 reduce=4 reduce only=0
Jul 4 09:13:12 Sipi[35206] <Debug>: thumbnail path: ./images/thumbs/IKbgm24XRP1-BniNwPfinyw.jpg
Jul 4 09:13:12 Sipi[35206] <Error>: ScriptHandler: error executing lua script: Error at [/Users/ljaouen/Soft/Code/github/Sipi/shttps/LuaServer.cpp: 2736]: LuaServer::executeChunk failed: [string "--..."]:154: attempt to concatenate a boolean value (local 'thumbPath'), scriptname: ./scripts/make_thumbnail.lua
at line:
local success, result = thumbImg:write(thumbPath)
thumbPath
turns from string to boolean... that sounds strange, testing in 604267079db24528204f303dcf9e9c4353210c4e :
Jul 4 09:38:47 Sipi[35423] <Debug>: thumbnail path: ./images/thumbs/Xieb5Rq7Xy-DnRm5iMAJAh.jpg
Jul 4 09:38:47 Sipi[35423] <Error>: ScriptHandler: error executing lua script: Error at [/Users/ljaouen/Soft/Code/github/Sipi/shttps/LuaServer.cpp: 2736]: LuaServer::executeChunk failed: [string "--..."]:153: attempt to concatenate a boolean value (local 'thumbPath'), scriptname: ./scripts/make_thumbnail.lua
the file was written though:
ljaouen@SSP28034:~/Soft/Code/github/Sipi$ ls -lsa ./images/thumbs/Xieb5Rq7Xy-DnRm5iMAJAh.jpg
0 -rw-r--r-- 1 ljaouen staff 0B 4 jul 09:38 ./images/thumbs/Xieb5Rq7Xy-DnRm5iMAJAh.jpg
here's another experiment then in 2b396530785ae0e04ab044532bb618937ef5ffd2 the result log is:
Jul 4 09:52:32 Sipi[35460] <Debug>: get_size: img_w=3492 img_h=2404 w=128 h=89 reduce=4 reduce only=0
Jul 4 09:52:33 Sipi[35460] <Debug>: thumbnail path: ./images/thumbs/HFbTHXaYjRF-D7lM4fN1Sbz.jpg
Jul 4 09:52:33 Sipi[35460] <Error>: Couldn't create thumbnail for path: false, result: false
I don't know lua or where the glue code to the C code is, but this looks more than very strange.
ok, maybe a problem with local vs. global variables.
I have made a small change.
Something else. Does make check
run through?
there is some progress:
Jul 4 11:29:42 Sipi[35898] <Debug>: get_size: img_w=3492 img_h=2404 w=128 h=89 reduce=4 reduce only=0
Jul 4 11:29:43 Sipi[35898] <Debug>: thumbnail path: ./images/thumbs/CPX8ssvBR5v-EYuar8cJG9X.jpg
Jul 4 11:29:43 Sipi[35898] <Error>: Couldn't create thumbnail for path: ./images/thumbs/CPX8ssvBR5v-EYuar8cJG9X.jpg, result: false
even though the file has been created.
it's has been created but it is empty:
$ ls -lsa ./images/thumbs/CPX8ssvBR5v-EYuar8cJG9X.jpg
0 -rw-r--r-- 1 ljaouen staff 0B 4 jul 11:29 ./images/thumbs/CPX8ssvBR5v-EYuar8cJG9X.jpg