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

Latest version of pdagent doesn't work with python3 #169

Open
bzlom opened this issue Nov 27, 2023 · 3 comments
Open

Latest version of pdagent doesn't work with python3 #169

bzlom opened this issue Nov 27, 2023 · 3 comments

Comments

@bzlom
Copy link

bzlom commented Nov 27, 2023

I'm running Amazon Linux 2023 that comes preinstalled with python3 (3.9.16). I have created a symlink from python to python3:

[root@ip-10-7-3-153 bin]# which python3
/usr/bin/python3
[root@ip-10-7-3-153 bin]# which python
/usr/bin/python
[root@ip-10-7-3-153 bin]# ls -la /usr/bin/python
lrwxrwxrwx. 1 root root 16 Nov 27 13:08 /usr/bin/python -> /usr/bin/python3
[root@ip-10-7-3-153 bin]# python -V
Python 3.9.16

I'm trying to start Pagerduty (pdagent-1.7.3-1.noarch, pdagent-integrations-1.6.2-1.noarch) but I'm getting the following errors:

Nov 27 13:12:33 server.local systemd[1]: Started pdagent.service - PagerDuty Agent.
Nov 27 13:12:33 server.local pdagentd[43558]: Traceback (most recent call last):
Nov 27 13:12:33 server.local pdagentd[43558]:   File "/usr/share/pdagent/bin/pdagentd.py", line 75, in <module>
Nov 27 13:12:33 server.local pdagentd[43558]:     import pdagent.config
Nov 27 13:12:33 server.local pdagentd[43558]: ModuleNotFoundError: No module named 'pdagent'
Nov 27 13:12:33 server.local pdagentd[43558]: During handling of the above exception, another exception occurred:
Nov 27 13:12:33 server.local pdagentd[43558]: Traceback (most recent call last):
Nov 27 13:12:33 server.local pdagentd[43558]:   File "/usr/share/pdagent/bin/pdagentd.py", line 81, in <module>
Nov 27 13:12:33 server.local pdagentd[43558]:     import pdagent.config
Nov 27 13:12:33 server.local pdagentd[43558]: ModuleNotFoundError: No module named 'pdagent'
Nov 27 13:12:33 server.local systemd[1]: pdagent.service: Main process exited, code=exited, status=1/FAILURE
Nov 27 13:12:33 server.local systemd[1]: pdagent.service: Failed with result 'exit-code'.

It works completely fine if I'm using its old python2.x libraries:
cp -a /usr/lib/python2.7/site-packages/pdagent/ /usr/share/pdagent/bin/pdagent/

Does it run with python3? Or are there any plans to make it work with it?

@shivinder
Copy link

It says in the [README.md] file for this project - "PagerDuty is planning to deprecate this tool in favour of go-pdagent. go-pdagent is not feature complete at this moment however it will be before an official deprecation notice."
This probably is an indication of what you said in your comments. It may not ever get Python3 support.

@lchopfpt
Copy link

Hello, are there any updates here? It's feeling like pdagent and friends have been abandoned.

@dbray925
Copy link

dbray925 commented Jul 8, 2024

Wait, so current agent is incompatible with the current supported version Python, and there is no fix for this, because they are focusing on a different language. Annoying! Thankfully, 3.6 seems to still work, so I just downgraded from 3.9 to 3.6:

sudo dnf -y remove python39
sudo alternatives --config python

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

4 participants