Atom-ImageJ mode question

Hi guys,

I have a running script test_czireader.py that works fine when started from the script editor. But when I launch Fiji from within ATOM and then try to run the script I get the error that a module cannot be found.

console: Failed to install '': java.nio.charset.UnsupportedCharsetException: cp0.
[INFO] Script Directory: C:\Users\m1srh\AppData\Local\atom\app-1.34.0\Scripts
[ERROR] null
Traceback (most recent call last):
  File "script.py", line 13, in <module>
ImportError: No module named fijipytools

	at org.python.core.Py.ImportError(Py.java:334)
	at org.python.core.imp.import_first(imp.java:879)
	at org.python.core.imp.import_module_level(imp.java:964)
	at org.python.core.imp.importName(imp.java:1057)
	at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
	at org.python.core.PyObject.__call__(PyObject.java:450)
	at org.python.core.__builtin__.__import__(__builtin__.java:1232)
	at org.python.core.imp.importFromAs(imp.java:1149)
	at org.python.core.imp.importFrom(imp.java:1124)
	at org.python.pycode._pyx0.f$0(script.py:59)
	at org.python.pycode._pyx0.call_function(script.py)
	at org.python.core.PyTableCode.call(PyTableCode.java:171)
	at org.python.core.PyCode.call(PyCode.java:18)
	at org.python.core.Py.runCode(Py.java:1614)
	at org.python.core.__builtin__.eval(__builtin__.java:497)
	at org.python.core.__builtin__.eval(__builtin__.java:501)
	at org.python.util.PythonInterpreter.eval(PythonInterpreter.java:259)
	at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:57)
	at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:31)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
	at org.scijava.script.ScriptModule.run(ScriptModule.java:160)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
	at org.scijava.thread.DefaultThreadService$3.call(DefaultThreadService.java:238)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
0:0:0:0:0:0:0:1 - - [12/Feb/2019:12:09:25 +0000] "POST /modules/command:net.imagej.server.external.ScriptEval?process=false HTTP/1.1" 200 27 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Atom/1.34.0 Chrome/61.0.3163.100 Electron/2.0.16 Safari/537.36" 5342

The actual script import the module using the code below. Both scripts and the class file are located inside the same folder

image

#@UIService uiService
#@LogService log

# append path
import os
import sys
scriptdir = os.path.join(os.getcwd(), 'Scripts')
sys.path.append(scriptdir)
log.info('Script Directory: ' + scriptdir)


# read in and display ImagePlus object(s)
from fijipytools import ExportTools, FilterTools, ImageTools, ImportTools
from fijipytools import AnalyzeTools, RoiTools, MiscTools, ThresholdTools


# clear the console automatically when not in headless mode
uiService.getDefaultUI().getConsolePane().clear()