question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

KeyError: 'pg_receivexlog_path

See original GitHub issue

2019-03-13 17:48:59,996 pghoard MainThread ERROR Unexpected exception in PGHoard When i run, i have this error:

main loop
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/pghoard/pghoard.py", line 483, in run
    self.handle_site(site, site_config)
  File "/usr/lib/python3.5/site-packages/pghoard/pghoard.py", line 422, in handle_site
    self.receivexlog_listener(site, chosen_backup_node, xlog_path + "_incoming")
  File "/usr/lib/python3.5/site-packages/pghoard/pghoard.py", line 177, in receivexlog_listener
    if not self.check_pg_versions_ok(site, pg_version_server, "pg_receivexlog"):
  File "/usr/lib/python3.5/site-packages/pghoard/pghoard.py", line 125, in check_pg_versions_ok
    pg_version_server, self.config[command + "_path"], pg_version_client)
KeyError: 'pg_receivexlog_path

My config file via default… Any ideas? pghoard version is: 2.0.0 postgres version is: 10.1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
OpakAlexcommented, Mar 14, 2019

when i am trying to run it on same machine as postgres:

2019-03-14 12:35:37,870 pghoard MainThread      DEBUG   Loading JSON config from: 'config.json', signal: None
Error: pg_wrapper: pg_receivexlog was not found in /usr/lib/postgresql/10/bin
2019-03-14 12:35:38,032 pghoard MainThread      ERROR   Invalid config file 'config.json': CalledProcessError: Command '['/usr/bin/pg_receivexlog', '--version']' returned non-zero exit status 1

But i put "active_backup_mode": "walreceiver", why it check pg_receivexlog ?

0reactions
rdunklaucommented, Aug 17, 2021

Hello ! This should be fixed by https://github.com/aiven/pghoard/commit/7df6714df3f4b0b3805df11c4c35873ba940d146. Feel free to reopen if that’s not the case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

KeyError as a direct cause of exception when i try to insert ...
Question: How can i try:except or work around this error in order to keep the code running until all data has been processed?...
Read more >
Fixing KeyError Exceptions in Python - YouTube
When you encounter a KeyError, there are a few standard ways to handle it. Depending on your use case, some of these solutions...
Read more >
What a Python KeyError Usually Means
Python's KeyError exception is a common exception encountered by beginners. Knowing why a KeyError can be raised and some solutions to ...
Read more >
Hitting an API rate limit raises KeyError from create_playlist()
In my experimentation auto-generating playlists, I started getting a KeyError from create_playlist(). Traceback (most recent call last): ...
Read more >
Python KeyError: A Beginner's Guide % - Career Karma
A Python KeyError is raised when you try to access a dictionary key that does not exist. On Career Karma, learn how to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found