Skip to content

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

@bzlom

Description

@bzlom

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions