Open jakirkham opened 8 years ago
Oops, missed this class_path=bioformats.JARS
when starting the VM.
After making that change, it tries to save, but seems to take a long time and never really completes. The file does appear, but is corrupted and I get some warnings from log4j. Here are the log messages I see. I don't think they should be the cause of any problems. It also seems this may be an upstream issue.
log4j:WARN No appenders could be found for logger (loci.common.services.ServiceFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
You're right about the log messages - not a big problem. I just tried:
import numpy as np
import javabridge
import bioformats
javabridge.start_vm(class_path=bioformats.JARS)
b = (np.random.random((110,120)) * ( np.iinfo(np.int16).max - np.iinfo(np.int16).min ) + np.iinfo(np.int16).min).astype(np.int16)
bioformats.formatwriter.write_image("c:/temp/test.tiff", b, bioformats.omexml.PT_INT16)
and got
I can't imagine that you'd run into memory problems. I tested it on Windows 7, Python 2.7, Bioformats 1.0.5, javabridge 1.0.11 and numpy 1.8.2. What versions are you running?
Version information.
$ conda list
# packages in environment at /zopt/conda/envs/bioformatsenv:
#
certifi 14.05.14 py27_0 defaults
cloog 0.18.0 0 defaults
gmp 5.1.2 6 defaults
ipython 3.2.1.9+ccf11df py27_0 file:///zopt/conda/conda-bld/osx-64/ipython-3.2.1.9+ccf11df-py27_0.tar.bz2
isl 0.12.2 1 defaults
javabridge 1.0.11 nppy27_0 file:///zopt/conda/conda-bld/osx-64/javabridge-1.0.11-nppy27_0.tar.bz2
jinja2 2.8 py27_0 defaults
jsonschema 2.4.0 py27_0 defaults
libgcc 4.8.5 0 jakirkham
libsodium 0.4.5 0 defaults
markupsafe 0.23 py27_0 defaults
mistune 0.7.1 py27_0 defaults
mpc 1.0.1 0 defaults
mpfr 3.1.2 0 defaults
nose 1.3.7 py27_0 defaults
numpy 1.9.3 py27_101 [openblas] jakirkham
openblas 0.2.14 675 jakirkham
openssl 1.0.1k 1 <unknown>
pip 7.1.2 py27_0 defaults
ptyprocess 0.4 py27_0 defaults
pygments 2.0.2 py27_0 defaults
python 2.7.10 1 defaults
python-bioformats 1.0.5 py27_0 file:///zopt/conda/conda-bld/osx-64/python-bioformats-1.0.5-py27_0.tar.bz2
python.app 1.2 py27_4 defaults
pyzmq 14.7.0 py27_0 defaults
readline 6.2 2 <unknown>
setuptools 18.3.2 py27_0 defaults
sqlite 3.8.4.1 1 <unknown>
ssl_match_hostname 3.4.0.2 py27_0 defaults
terminado 0.5 py27_0 defaults
tk 8.5.18 0 <unknown>
tornado 4.2.1 py27_0 jakirkham
wheel 0.26.0 py27_1 defaults
zeromq 4.0.5 0 defaults
zlib 1.2.8 0 <unknown>
Also, on Mac OS 10.9. Latest version of JRE (1.8.0), as well.
All looks good. If you're running from source, can you execute:
python setup.py develop
python nosetests.py
I have it running 131 tests without errors after checking out the 1.0.5 tag.
Testing on both python-bioformats
and python-javabridge
is passing for me when using HEAD
or the latest release. Both were installed in develop mode. With python-javabridge
, I simply ran nosetests
.
I tried to reproduce this on Linux and was unable to. The platforms tested were Ubuntu Precise inside a docker container and CentOS 6.3 native install on a cluster. This seems to be a problem only on Mac.
I also tried to downgrade Java 1.8 to 1.7, in which I was successful. However, this still did not resolve the problem.
More info: It appears to open a Java Application called "bin", after which it hangs. I hope this additional information is helpful.
@jakirkham Have you solved this issue yet? I have exactly the same problem when running on Mac.
Nope, haven't had the opportunity to play with this lately.
I tried to do the following, but ran into the exception below. I think this line ( https://github.com/CellProfiler/python-bioformats/blob/master/bioformats/formatwriter.py#L94 ) may be suspect. However, I could be wrong.