The "file" argument must be of type string. Received undefined ERROR

The "file" argument must be of type string. Received undefined ERROR

I was getting the following error when I try to deploy my python functions.

 catalyst deploy --only functions
⚠ skipping deploy of target [authorization_portal_function] since The "file" argument must be of type string. Received undefined

✖ functions: deploy skipped

✖ No components deployed!

After struggling for an hour, I figured out the reason for the error was that I had Python 3.11 instead of Python 3.9. After I install python 3.9, the error went away and the functions deployed successfully.

The error message was not very clear and my search on the internet did not yield any useful information. So, I am posting it here for anyone else who may run into the same issue.

      Catalyst Community