Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Threads - attempt to call method split a nil value #63

Open
mattdns1006 opened this issue May 11, 2016 · 2 comments
Open

Threads - attempt to call method split a nil value #63

mattdns1006 opened this issue May 11, 2016 · 2 comments

Comments

@mattdns1006
Copy link

I am running some threads but I can't get the string split method to work, the method doesn't exist in the threads but it does work normally.
The below code prints "string" for each thread however if I add the line which is currently commented out it throws the error;

donkeys.lua:16: attempt to call method 'split' (a nil value)
donkeys = Threads(
                      params.nThreads,
                         function(idx)
                                 require "torch"
                                 require "string"
                                 tid = idx -- Thread id
                                 print(string.format("Initialized thread with id : %d.", did))
                                 eg = "x,y,z"
                                 print(type(eg)) 
                                 --print(eg:split(",")) 
                         end
                         )
end                     

@deltheil
Copy link
Contributor

It is provided by xlua.

@mattdns1006
Copy link
Author

perfect thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants