hsnr-gamera / gamera-4

Gamera 4 for Python 3
GNU General Public License v2.0
10 stars 8 forks source link

Build problem #14

Closed jsbien closed 4 years ago

jsbien commented 4 years ago

I just compiled the source on Debian buster and get


  File "/usr/local/lib/python3.7/dist-packages/gamera/gui/classifier_display.py", line 922, in _OnOpenAll
    """)
  File "/usr/local/lib/python3.7/dist-packages/gamera/args.py", line 44, in show
    raise Exception("No GUI environment available.  Cannot display dialog.")
Exception: No GUI environment available.  Cannot display dialog.
``
Any suggestion?

Best regards

Janusz
Cyperghost commented 4 years ago

Did you have install gtk and the wx lib for python?

jsbien commented 4 years ago

On Wed, Feb 05 2020 at 0:46 -08, Olaf Braun wrote:

Did you have install gtk and the wx lib for python?

Yes.

The Gamera and Classifier windows open without problem, the bug appears when I try File - Open All.

Cyperghost commented 4 years ago

Fixed with #15

jsbien commented 4 years ago

When trying to open the enclosed directory, I get now `Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/gamera/gui/classifier_display.py", line 935, in _OnOpenAll os.path.join(directory, "classifier_settings.xml")) File "/usr/local/lib/python3.7/dist-packages/gamera/gui/classifier_display.py", line 1673, in _OpenClassifierSettings self._classifier.load_settings(filename) File "/usr/local/lib/python3.7/dist-packages/gamera/knn.py", line 340, in load_settings self.set_weights(weights) RuntimeError: knn: Error getting weight array buffer.'

mydata.tar.gz

Cyperghost commented 4 years ago

So, I have found the problem. Please recompile the project and test it again.

jsbien commented 4 years ago

Unfortunately now I get the segmentation fault preceeded by several messages: `(gamera_gui:2707): Gtk-WARNING **: 13:04:34.318: Negative content width -10 (allocation 24, extents 17x17) while allocating gadget (node button, owner GtkButton)'

Cyperghost commented 4 years ago

What did you exactly do?

jsbien commented 4 years ago

Still trying to use Open All on the directory generated on another computer with a standard Debian version of Gamera. I've uploaded the content of the directory 9 days ago, see above.

Cyperghost commented 4 years ago

I have testet it, but I didn't get this error. Did you try to clean the build dir and build/install gamera again?

jsbien commented 4 years ago

Quote/Cytat - Olaf Braun notifications@github.com (śro, 19 lut 2020,
22:17:33):

I have testet it, but I didn't get this error. Did you try to clean
the build dir and build/install gamera again?

This is a fresh install on a fresh virtual machine (perhaps some
nonobvious dependency missing?). There is a lot of messages from
python3 setup.py build, I assumed they are just warnings. However
today I noticed:

/home/vmbuster/gamera-4/gamera/plugins/_png_support.cpp:3:18: fatal
error: png.h: No such file or directory

/usr/bin/ld: cannot find -ltiff collect2: error: ld returned 1 exit status

Do you want me to upload the full log?

BTW, looks like Firefox in VM is unable to display GiHub corretly
(style sheets not used???), so I answer by mail.

cdalitz commented 4 years ago

Can you please check, whether the packages "libnpg-dev" (should include /usr/include/png.h) and "libtiff-dev" (should include /usr/lib/x86_64-linux-gnu/libtiff.so, where the architecture depends on your system)?

jsbien commented 4 years ago

Quote/Cytat - cdalitz notifications@github.com (czw, 20 lut 2020, 10:34:56):

Can you please check, whether the packages "libnpg-dev" (should
include /usr/include/png.h) and "libtiff-dev" (should include
/usr/lib/x86_64-linux-gnu/libtiff.so, where the architecture depends
on your system)?

Unfortunately adding these packages did not help - still the
segmentation fault. I will upload the logs later.

Cyperghost commented 4 years ago

I testet it with a fresh Debian image but it works. So, did you complete install anything from this list? https://github.com/hsnr-gamera/gamera-4/blob/master/doc/src/install.txt

jsbien commented 4 years ago

In case of Debian is not clear (at least for me) which packages should be installed. Anyway adding some *-dev packages and a fresh install solved the problem. Thank you for your help!

jsbien commented 4 years ago

I just realized I have another problem with Open All. myrealdata.zip The enclosed directory opened correctly on old Gamera, but now I get Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/gamera/gui/classifier_display.py", line 942, in _OnOpenAll [os.path.join(directory, "page_glyphs.xml")]) File "/usr/local/lib/python3.7/dist-packages/gamera/gui/classifier_display.py", line 1231, in _OpenPageCollection self.set_multi_image(glyphs) File "/usr/local/lib/python3.7/dist-packages/gamera/gui/classifier_display.py", line 719, in set_multi_image self._symbol_table.add(id[1]) File "/usr/local/lib/python3.7/dist-packages/gamera/symbol_table.py", line 68, in add self.trigger_callback('add', tokens) File "/usr/local/lib/python3.7/dist-packages/gamera/util.py", line 390, in trigger_callback callback(*args) File "/usr/local/lib/python3.7/dist-packages/gamera/gui/classifier_display.py", line 1874, in symbol_table_addcallback if token.startswith(''): TypeError: startswith first arg must be bytes or a tuple of bytes, not str

The warnings (gamera_gui:2387): Gtk-WARNING **: 20:09:12.238: Negative content width -10 (allocation 24, extents 17x17) while allocating gadget (node button, owner GtkButton) appear in both versions of Gamera,

Cyperghost commented 4 years ago

Update the source of gemera and rebuild it

jsbien commented 4 years ago

Thanks.