Skip to content

How to handle error when python's path is invalid? #118

@itsdax

Description

@itsdax
            const PythonShell = require('python-shell');
            const options = {
                pythonPath: './notthepythonpath',
                scriptPath: 'scriptdir',
                args: [0, 0, 400, 400, 1, store.get('outputPath')],
                mode: 'text',
            };
            let pyshell = new PythonShell('script.py', options);
            pyshell.on('error', (err) => {
                alert(err);
            });

I've tried the callback ,and tried on('error') but both doesn't seem to catch it.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions