-
Notifications
You must be signed in to change notification settings - Fork 16
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
attempt to call upvalue 'Statsd' (a table value) #9
Comments
I can suggest you use different statsd library. Because this library return function |
Thanks for your response. Can you please let me know how you are instantiating the statsd object and calling its methods in your code. |
I think this is almost complite example. I run it as service. |
Thanks for your example. I am still running into the same issue. I followed your guidance as shown in your example. Below is my code snippet.
During runtime I get this error where I am trying to create the local variable "Statsd".
Do you know what I am doing wrong? |
You use differen library i think |
This is the library I am running.
|
|
I checked what is in the table. I am printing the key and the type of the value. The output here is from just require 'statsd'.
I also see that the statsd.lua is loaded from the location
It is the exact same code as the one in this repo. |
I am able to set the table values like this
When I try to call the function
I get the error method
Instead if I do this
then I get the error
|
I think I made some progress. Right now I can confirm that it is loading the correct statsd.lua. But is failing within that code on line #22.
Which is https://github.com/stvp/lua-statsd-client/blob/master/src/statsd.lua#L22 |
you can close this case. Thanks for all your help. |
Hi,
I am new to lua. I am following the steps provided in README.md. Whenever I try to run my code I am getting the runtime error as mentioned above.
Here is my code snippet.
Can you please help?
From the error it seems like I am trying to call Statsd as a function where as it is a table.
How can I call the Statsd as a function?
The text was updated successfully, but these errors were encountered: