-
Notifications
You must be signed in to change notification settings - Fork 1
File not found error on Windows 10: setup script problem? #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the report. Looks like a windows specific issue..
and retry stablemotifs_setup (after git pull) |
Sorry for the slow reply. I have been doing some testing with Jorge to figure out what's going on with his Java version of stable motifs. I did try this again, and I get a different error now that I am pretty sure this has to do with deprecated Java functions in the stable motifs Java code and not anything with this Python interface. Here is the output: Filename: SmallTest.txt
Creating Boolean table directory: SmallTest
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "javax.script.ScriptEngine.eval(String)" because "engine" is null
at stablemotifs.OtherMethods.EvalStr(OtherMethods.java:235)
at stablemotifs.ReadWriteFiles.createTablesFromBooleanRules(ReadWriteFiles.java:254)
at stablemotifs.Main.main(Main.java:69)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\jcroz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\stablemotifs\__init__.py", line 122, in load
return StableMotifsResult(wd, model_name, fixed)
File "C:\Users\jcroz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\stablemotifs\results.py", line 23, in __init__
self.attractors = self._parse_attractors()
File "C:\Users\jcroz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\stablemotifs\results.py", line 30, in _parse_attractors
df = pd.read_csv(inputf, sep='\t', index_col=-1) #index_col=-1 we cheat by making the extra tabs at the end of the rows in the files as the index column, and then resetting it to just natural incrementing integers
File "C:\Users\jcroz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pandas\io\parsers.py", line 676, in parser_f
return _read(filepath_or_buffer, kwds)
File "C:\Users\jcroz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pandas\io\parsers.py", line 448, in _read
parser = TextFileReader(fp_or_buf, **kwds)
File "C:\Users\jcroz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pandas\io\parsers.py", line 880, in __init__
self._make_engine(self.engine)
File "C:\Users\jcroz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pandas\io\parsers.py", line 1114, in _make_engine
self._engine = CParserWrapper(self.f, **self.options)
File "C:\Users\jcroz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pandas\io\parsers.py", line 1891, in __init__
self._reader = parsers.TextReader(src, **kwds)
File "pandas\_libs\parsers.pyx", line 374, in pandas._libs.parsers.TextReader.__cinit__
File "pandas\_libs\parsers.pyx", line 674, in pandas._libs.parsers.TextReader._setup_parser_source
FileNotFoundError: [Errno 2] File C:\Users\jcroz\AppData\Local\Temp\StableMotifs-vcbxch1m\SmallTest-QuasiAttractors.txt does not exist: 'C:\\Users\\jcroz\\AppData\\Local\\Temp\\StableMotifs-vcbxch1m\\SmallTest-QuasiAttractors.txt' I strongly suspect this is due to Java dropping Nashorn support in JRE/JDK 15. There is an update in the Java stable motifs readme about this: https://github.com/jgtz/StableMotifs. I've been able to work around this by changing the Python Java calls to point to an older JDK version, i.e., java_path = "<path to old Java version>\\bin\\java.exe"
jar_path = "<path to stable motifs Java directory>\\dist\\StableMotifs.jar"
def run_stable_motifs(filepath):
wd = tempfile.mkdtemp(prefix="StableMotifs-")
def cleanup():
shutil.rmtree(wd)
atexit.register(cleanup)
shutil.copy(filepath, wd)
base = os.path.basename(filepath)
argv = [java_path,'-jar',jar_path, base]
proc = subprocess.Popen(argv, cwd=wd,stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
result = proc.communicate()
.
.
. I got this to work with JDK 8 without warnings, but in principle, any version before 15 should work (potentially with lots of warnings about impending deprecation). |
I cannot get this to work; I get a FileNotFoundError. Here is an example.
I installed via pip and the setup script output is
However, the supposedly installed files listed do not exist:
The text was updated successfully, but these errors were encountered: