pg_activity icon indicating copy to clipboard operation
pg_activity copied to clipboard

_curses.error: cbreak() returned ERR when running jenkins

Open kw-andy opened this issue 2 years ago • 1 comments

I'm running pg_activity through a bash script to simulate that pg_activity that can launch correctly without any issues. Below is my script

#!/usr/bin/bash 

/soft/python3.7/bin/pg_activity <<EOF > /tmp/another_log_file141123.log 2>&1
h
q
q
EOF

The aim of my bash script is to emulate the run of pg_activity, then input a h plus q twice.

Through a terminal, it behaves correctly. Issue is I'm sending it through a Jenkins pipeline.

it gives me the following errors

Traceback (most recent call last):
  File "/soft/python3.7/bin/pg_activity", line 320, in main
    PGAUI.init_curses()
  File "/soft/python3.7/lib/python3.7/site-packages/pgactivity/UI.py", line 472, in init_curses
    self.__init_curses()
  File "/soft/python3.7/lib/python3.7/site-packages/pgactivity/UI.py", line 609, in __init_curses
    curses.cbreak()
_curses.error: cbreak() returned ERR

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/soft/python3.7/bin/pg_activity", line 462, in <module>
    main()
  File "/soft/python3.7/bin/pg_activity", line 401, in main
    PGAUI.at_exit_curses()
  File "/soft/python3.7/lib/python3.7/site-packages/pgactivity/UI.py", line 696, in at_exit_curses
    curses.nocbreak()
_curses.error: nocbreak() returned ERR

I have checked the available ressources on the net and there is nothing really striking to solve my problem.

Any clues or hints would be welcomed.

kw-andy avatar Nov 14 '23 09:11 kw-andy

Which version of pg_activity are you using? From the traceback you posted, it seems very very old. Can you try using a more recent version?

dlax avatar Nov 16 '23 12:11 dlax

No anwser, closing.

dlax avatar Mar 29 '24 08:03 dlax