Socket problem

Asked by ToniMontana

I have problems with the following scripts:
- FeedWatch 1.0h LUA 5.1x [Strict][API 2]
http://board.ptokax.ch/index.php/topic,7789.msg78871.html#msg78871

- Confirm DNS 1.0d Lua 5.1x [Strict][API 2]
http://board.ptokax.ch/index.php/topic,7612.msg78784.html#msg78784

- DNSLookup 1.0d LUA 5.1x [Strict] [API 2]
http://board.ptokax.ch/index.php/topic,7595.msg72134.html#msg72134

- Translate 1.0 LUA 5.1x [Strict][API 2]
http://board.ptokax.ch/index.php/topic,7843.msg76989.html#msg76989

LuaScript: Error loading file: adchpp-ptokax.lua:1056: Error loading the module "socket" via "require"

Can you make a new rev which fixes this problem?

Question information

Language:
English Edit question
Status:
Solved
For:
ADCH++-PtokaX Edit question
Assignee:
No assignee Edit question
Solved by:
poy
Solved:
Last query:
Last reply:
Revision history for this message
Pirre (pierreparys) said :
#1

Do you have the socket installed ?

If not:
Get the lua socket module luasocket-2.0.2-lua-5.1.2-Win32-vc8.zip (not the px one) from for example http://freelance-projects.net/LuaSocket-v2.0.2-module.html

Unzip it to HD keeping the folder structure (dont unzip the lua5.1.exe or the lua5.1.dll you dont need them

Then go into the created LUA folder select all and copy to your ADCH root folder that contains your exe file (atleast that where i putted them)

Get the latest rev of the adchpp-ptokax bridge ad make sure you put all in the correct place and try , the socket works here alto not tryed those explicit lua's scripts

Revision history for this message
ToniMontana (nformatoni) said :
#2

Thx for reply Pirre but this didnt solve the problem.
I had better mentioned in my first post that i am using the latest rev
and that i have the socket installed (i have it in Scripts/libs).
But i tried it with the version you linked and put it at the location that you mention in your post.
Didnt fix it - With this socket version i get another error message:
LuaScript: Error loading file: adchpp-ptokax.lua:1056: Error loading the module "socket.core" via "require"

cheers

Revision history for this message
Pirre (pierreparys) said :
#3

ok :) ps hi neighbour hub lol

give me please the exact srcip with this error and will try it ...

Revision history for this message
Pirre (pierreparys) said :
#4

Have tried DNSlookup and it works just fine, control your folder structure for adch++\socket\core.dll if you done the socket install like describet above it should be there :)

And indeed its confusing lol

Revision history for this message
ToniMontana (nformatoni) said :
#5

I did a fresh install from the hub and now the scripts get loaded
but now there are new problems
- FeedWatch 1.0h LUA 5.1x [Strict][API 2]
As soon as this script is loaded the hub crash but there is no error report in log.

- Translate 1.0 LUA 5.1x [Strict][API 2]
2, 4: Translate10.lua:134: attempt to index global 'socket' (a nil value)
stack traceback:
Translate10.lua:134: in function 'Translate'
Translate10.lua:106: in function '?'
adchpp-ptokax.lua:71: in function <adchpp-ptokax.lua:67>
(tail call): ?
adchpp-ptokax.lua:1262: in function <adchpp-ptokax.lua:1158>

cheers

Revision history for this message
Pirre (pierreparys) said :
#6

Can't see whats causing the first error as it is a compiled lua

The second error seems to be hapening when it try's to fill in

local Path,Script = Core.GetPtokaXPath().."scripts/","FeedWatch 1.0d"

don't find that function in the adch-px bridge :)

Revision history for this message
Pirre (pierreparys) said :
#7

Can't see whats causing the first error as it is a compiled lua

The second error seems to be hapening when it try's to fill in

local Path,Script = Core.GetPtokaXPath().."scripts/","FeedWatch 1.0d"

don't find that function in the adch-px bridge :)

Revision history for this message
ToniMontana (nformatoni) said :
#8

i dont think that you are right on this.
local Path,Script = Core.GetPtokaXPath().."scripts/","FeedWatch 1.0d"

Script is used for the SubMenu name
and Path is for the location of the feed .dat files (load and save them)

this works in other scripts so why should it now cause a problem?

Revision history for this message
ToniMontana (nformatoni) said :
#9

Btw the first error is about FeedWatch script and this is not compiled.
It let the hub crash without error message.

And the 2nd error is about the compiled "Translate" script
and in this you dont find the line
local Path,Script = Core.GetPtokaXPath().."scripts/","FeedWatch 1.0d"

This line is from the FeedWatch script and
therefore this cant be the problem with the Translate script. ;) :D

Revision history for this message
ToniMontana (nformatoni) said :
#10

I found out what made the hub crash when FeedWatch 1.0h LUA 5.1x [Strict][API 2] is loaded.
When this is set to true:
-- Poll StartFeed at script start? true/false [false = poll at first timer interval]
local PollAtStart = true

changing this to false "fix" it but its not really a fix cause it would be nice to use the poll at start.
Seems there needs to be something added to the ptokax-bridge to make that work.

cheers

Revision history for this message
ToniMontana (nformatoni) said :
#11

And another update for this topic.
The Feedwatch script commands work properly
bot gets registered on the hub and RCMenu is available
but as soon as the first timer interval for the poll is made the hub crash.
Seems that it have to do with the timer.

Revision history for this message
poy (poy) said :
#12

these problems are for the most part related to the fact that there is no version of lua-socket for ADCH++ yet. using the downloadable pre-compiled version might work by chance, but as seen here it often just crashes.
i am planning on making some later on that will be directly linked to ADCH++'s Lua module...

Revision history for this message
ToniMontana (nformatoni) said :
#13

any news about ADCH++ LUA Socket library version?
I really need these libraries cause without them i cannot use
the RSS Feedwatch script and the iMDB Search script
cause both use the http.request from the socket libraries.
Seems that it is the http.request that makes the hub crash
when using the downloadable precompiled LUA socket versions.

Revision history for this message
Best poy (poy) said :
#14

here they are in rev 71, enjoy. :)

Revision history for this message
ToniMontana (nformatoni) said :
#15

Thanks poy, that solved my question.