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

LogIn with API #10

Open
steevivo opened this issue Jun 22, 2019 · 10 comments
Open

LogIn with API #10

steevivo opened this issue Jun 22, 2019 · 10 comments

Comments

@steevivo
Copy link

Hi,

Since few days , I have a strange error with login API :
Traceback (most recent call last):
File "./zhostfinder.py", line 114, in
zapi.login(username, password)
TypeError: 'ZabbixAPIObjectClass' object is not callable

Any Ideas ?
Thx

@steevivo
Copy link
Author

It's ok now

@q1x
Copy link
Owner

q1x commented Jun 27, 2019

Hi Stephane,

Can you share what the problem was?

@steevivo
Copy link
Author

steevivo commented Jun 27, 2019

Hi Raymond,

In fact I think this is not a good way but for my test I modify this line :

# Login to the Zabbix API
zapi.login(username, password)

By this 
#zapi.login(username, password)

And it's running.... I use zabbix 4.2.1 and I don't know if it's an API problem or not

@q1x
Copy link
Owner

q1x commented Jun 27, 2019

Hi Stephane,

I just checked on a fresh Centos7 install with Zabbix 4.0.9, no issues there as far as I can see right now.
Did you use a configuration file or did you pass api parameters on the cli as arguments?

Regards,

Raymond

@steevivo
Copy link
Author

Raymond ,
Yes I use it with .zbx.conf , this is why I have the message I think so , sorry about that

Regards
Stephane

@q1x
Copy link
Owner

q1x commented Jun 27, 2019

Ok, is this with all scripts or just with a specific one?

@steevivo
Copy link
Author

For All scripts

@q1x
Copy link
Owner

q1x commented Jun 28, 2019

which version of pyzabbix are you using?

@steevivo
Copy link
Author

pyzabbix 0.7.5

@herdir
Copy link

herdir commented May 17, 2022

Same issue with pyzabbix Version: 1.0.0
using Python 2.7.18

Traceback (most recent call last): File "./zhostupdater.py", line 126, in <module> zapi.login(username, password) TypeError: 'ZabbixAPIObjectClass' object is not callable

Same issue using Python 3.9.2 and pyzabbix Version: 1.0.0

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

3 participants