How to rectify the error in Pre-request Script while encoding the content in base64

While writing a pre-request script for encoding the content to base64, I’m getting the following error as shown in the screenshot.

My main aim was to use the GET call and fetch the contents from a file in my github repo, as the content is encoded in base 64 I want to

  1. decode the content
  2. do some changes
  3. encode the content back to base64 and
  4. do a PUT call to send it github.

Right now I’m trying the encoding part and I’m getting stuck with this error.

Or if there is any other way to do the above procedure please do let me know.

The screenshots are present in the google drive link as i had an error while uploading the screenshot here.

See if you have any collection level prerequest script or folder level . This error might be from that

Nope I don’t have any collection level prerequest script.