ERPNext custom server script ImportError: __import__ not found

I’m trying to use aws services with python using boto3 library from a custom script but I’m getting error on trying to import the module that I have installed using pip3:

ImportError: __import__ not found

What does this mean and how do I fix this? I’m using version 13 branch.

Arbitrary imports are not allowed using Server Scripts. Moreover only following methods are available Server Script

If you are using a custom app then you can add additional methods to this list with jenv hook.

2 Likes

Okay so in this scenario I would have to create a custom app? Can external libraries be imported from a custom app?

hello friends I was doing some validation in Custom Script and now when trying to save information in the customer module I get the following error.

image

I am using version 12.