Post

PRET - Error dumping NVRAM

PRET - Error dumping NVRAM

PRET - Error dumping NVRAM

When running nvram dump:

image1

Fixes:

In pjl.py - line 741:

  • Change:
1
file().write(lpath, "") # empty file

to

1
file().write(lpath, b"") # empty file

image2

In helper.py - line 406 - append function:

  • Change append function to:
1
2
3
4
5
def append(self, path, data):
    # Ensure data is in bytes format
    if isinstance(data, str):
        data = data.encode('utf-8')
    self.write(path, data, 'ab+')

image3

  • Now it works:

image4

This post is licensed under CC BY 4.0 by the author.