paradoxxxzero / atom-python-import-magic

Import automatically python modules using importmagic
MIT License
4 stars 2 forks source link

Uncaught TypeError: Cannot read property 'split' of undefined #6

Open Le-Stagiaire opened 7 years ago

Le-Stagiaire commented 7 years ago

When the python package is not installed, I got this error when I try to magic import :

Stack Trace

Uncaught TypeError: Cannot read property 'split' of undefined

At /usr/lib/atom/node_modules/text-buffer/lib/text-buffer.js:823

TypeError: Cannot read property 'split' of undefined
    at Object.lineDiff.tokenize (/usr/lib/atom/node_modules/text-buffer/node_modules/diff/lib/diff/line.js:22:31)
    at Object.diff (/usr/lib/atom/node_modules/text-buffer/node_modules/diff/lib/diff/base.js:36:39)
    at Object.diffLines (/usr/lib/atom/node_modules/text-buffer/node_modules/diff/lib/diff/line.js:47:19)
    at /usr/lib/atom/node_modules/text-buffer/lib/text-buffer.js:506:27
    at TextBuffer.module.exports.TextBuffer.transact (/usr/lib/atom/node_modules/text-buffer/lib/text-buffer.js:818:18)
    at TextBuffer.module.exports.TextBuffer.setTextViaDiff (/usr/lib/atom/node_modules/text-buffer/lib/text-buffer.js:500:19)
    at /packages/python-import-magic/lib/python-import-magic.js:76:42
    at /packages/python-import-magic/lib/proc.js:76:21)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:493:12)

Maybe a more explicit error such as ' You need to ****ing install the python package you dumass ' could be nice :+1: