Skip to content

because setenv is async, should await #160

@david-shu

Description

@david-shu

in file : serious_python_android.dart

`
setenv("PYTHONINSPECT", "1");
setenv("PYTHONDONTWRITEBYTECODE", "1");
setenv("PYTHONNOUSERSITE", "1");
setenv("PYTHONUNBUFFERED", "1");
setenv("LC_CTYPE", "UTF-8");
setenv("PYTHONHOME", pythonLibPath);
setenv("PYTHONPATH", moduleSearchPaths.join(":"));

// set environment variables
if (environmentVariables != null) {
for (var v in environmentVariables.entries) {
setenv(v.key, v.value);
}
}
`
Due to the asynchronous nature of setenv, it may cause libpython loading exceptions or require dart to pass environment variables to python scripts, but setenv is not set in a timely manner, resulting in python script exceptions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions