These are chat archives for girder/girder

19th
Jul 2016
Stuart Nelson
@sutartmelson
Jul 19 2016 18:33
The current metadata extractor uses hachoir, which only works with python 2.7. There is a hachoir3, which works with only >3.2. How might this be written in a cross version way?
Can dependencies change based on installed python version?
Zach Mullen
@zachmullen
Jul 19 2016 18:34
we already condition our requirement on hachoir based on the python version, we could make that happen
Stuart Nelson
@sutartmelson
Jul 19 2016 18:34
Okay cool!
Zach Mullen
@zachmullen
Jul 19 2016 18:34
and then in the python module you can just do try/except around imports to figure out at runtime which one you're using
or even just check the sys.version
Stuart Nelson
@sutartmelson
Jul 19 2016 18:41
Oh okay. Seems simple enough.
Stuart Nelson
@sutartmelson
Jul 19 2016 18:47
Can you point me in the right direction for setting up a "configure" page for a plugin?
Stuart Nelson
@sutartmelson
Jul 19 2016 18:51
Thanks! I think I might try and make a plugin specifically for dicom images, with a config to select which attributes you want extracted.
Zach Mullen
@zachmullen
Jul 19 2016 18:51
cool :)
making the metadata extractor work in python3 would be great
Kacper Kowalik
@Xarthisius
Jul 19 2016 19:17
@zachmullen is that failure real? https://travis-ci.org/girder/girder/jobs/145908869 ?
Zach Mullen
@zachmullen
Jul 19 2016 19:18
Nope, travis ran out of memory. I restarted
Kacper Kowalik
@Xarthisius
Jul 19 2016 19:19
thanks!
Stuart Nelson
@sutartmelson
Jul 19 2016 22:03
In 2.7, the metadata extractor works, in 3.5 it gets a
"TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases"
when using modelImporter as a base class.
try:
    from girder.utility.model_importer import ModelImporter

except ImportError:
    ModelImporter = None
Stuart Nelson
@sutartmelson
Jul 19 2016 22:23
It seems to work despite that error.. so ignore this!