pmgsh failing

Sep 17, 2020
310
19
23
Hello,

In running pmgsh to generate some stats, this month it looks like I'm getting an error.
I verified everything is current.
SInce I get stats regularly the command is saved in a bash script so its not a user error unless the format of the command changed.

I did a quick manual execution and get the same error:
pmgsh get /statistics/receiver -year 2023
Can't call method "init_request" on an undefined value at /usr/bin/pmgsh line 454.
 
depending how much time you want to invest you could

* simply change the lines (for this patch it's especially simple just remove the line starting with '-' and add the line starting with '+' at the right places)
* use the 'patch' tool (see 'man patch' how to do it)
* set up a full dev environment to build the pmg-api package yourself, and use 'git am' to apply patches. for more details on that see:
https://pmg.proxmox.com/wiki/index.php/Developer_Documentation
https://pve.proxmox.com/wiki/Developer_Documentation (pmg and pve development are very similar so i linked it here too)

(the pages might be outdated currently and point to 'bullseye' stuff, you'd have to replace that with 'bookworm' for 8.0)

for this though, i'd recommend editing the file manually if you really need it now, otherwise i'd wait for a new package version (should not take too long for this)
 
Thanks, I have seen these configuration method for patches.
I'll check in the morning if the update is available, if not and I need to get the data, I can make the edits.

Thanks again!
 
Is this fixed in the latest version?
I have an up-to-date system and get the same error.
 
Hi,
yes, it should be fixed in pmg-api >= 8.0.4 available in all repositories. You can check with pmgversion -v what you have installed. Otherwise, please provide the exact command and error.
 
Oh, sorry, I'm still on 7.3.7. I was convinced that apt update/upgrade was all I had to do.
Just found the Upgrade_from_7_to_8 page in the wiki.

Thanks!
 
Oh, sorry, I'm still on 7.3.7. I was convinced that apt update/upgrade was all I had to do.
Just found the Upgrade_from_7_to_8 page in the wiki.

Thanks!
Ah, I wasn't aware that the issue is also in PMG 7. There it is fixed in pmg-api >= 7.3-8 which currently is only available in the PMG test repository. You can temporarily enable it, install the package, and disable it again. But PMG 7 won't be supported forever, so upgrading to PMG 8 is something that needs to be done sooner or later anyways :)
 
  • Like
Reactions: Onyx

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!