# Python module error using Externalsession

What I am trying to do is to generate an array using Python inside Mathematica but I getting TypeError required field:type_ignores missing Module. Here is the image: And then I check if the session is available with the 2+2.

You're probably using Python 3.8:

Here's the fix that worked for me, although I still have to call the python from ExternalEvaluate[]:

open C:\Program Files\Wolfram Research\Mathematica\12.0\SystemFiles\Links\WolframClientForPython\wolframclient\utils\externalevaluate.py

Go to line 66

replace exec(compile(ast.Module(expressions), '', 'exec'), current)

with exec(compile(ast.Module(expressions, []), '', 'exec'), current)

Referenced from: https://gist.github.com/Riebart/7622c17237a6ddb2516fd09ea67307ff