Coder Social home page Coder Social logo

Comments (19)

phamvandan avatar phamvandan commented on August 29, 2024 31

HELLO GUYS, After many months work with this error, I have just passed this by append this two lines in the head of the main python file. It will specify only version, which you want when your environment have many version of GTK. Good lucks !
import gi
gi.require_version('Gtk', '2.0')

from fastfusion.

devkapilbansal avatar devkapilbansal commented on August 29, 2024 3

@devkapilbansal Oh, i don't know this error

@phamvandan I found it. It was because I was using matplotlib and opencv at a same time and probably both uses different Gtk versions

from fastfusion.

alao-emmanuel avatar alao-emmanuel commented on August 29, 2024 1

import gi
gi.require_version('Gtk', '2.0')

Could you elaborate how to implement the fix above pls?
Thank you

Fix related to this error running eviacam:
(eviacam:22012): Gtk-ERROR **: 15:04:20.718: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
Trace/breakpoint trap (core dumped)

Just add it to the "TOP" of your python script or avoiding using both openCV and matplotlib

from fastfusion.

tashianasir avatar tashianasir commented on August 29, 2024

Please note that "ldd" shows only gtk3, I am unable to understand how gtk2 symbols are being used by the program.

`~/fastfusion $ ldd -d bin/onlinefusion | grep gtk

libgtk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007f51ee529000)

`

from fastfusion.

mayankamedhe avatar mayankamedhe commented on August 29, 2024

Hi,
I am facing the same problem. Does anyone know how to solve it? @tashianasir?

from fastfusion.

dbadrian avatar dbadrian commented on August 29, 2024

(I'm on Ubuntu 18.04)

I fixed it by manually compiling OpenCV and setting it to use GTK2.0. Make sure to enable
WITH_GTK_2_X when configuring via CMake.

Afterwards you might face a new bug, if you use the most recent OpenCV version, about ::type not being a member or something (sry, dont have my logs anymore).

You need to change all:
cv::Datatype< DT >::type to cv::traits::Type::value

Furthermore, in src/auxiliary/ocv_tools.cpp I needed to comment out a part of the code which is referencing a now out-dated datatype. Specifically this part:

#include <auxiliary/ocv_tools.h>
[...]

    // if(m.type() == cv::traits::Type<uint>::value)
    // {
    //     return "uint";
    // }

[...]

For me this doesn't break anything. If it does for you, either recompile OpenCV with deprecated types enabled in traits, or change to a new, equivalent type.

EDIT: For example, see https://github.com/ros-perception/image_pipeline/pull/302/files which performs a comparable fix in a DIFFERENT (aka unrelated) project.

from fastfusion.

imohammadhossein avatar imohammadhossein commented on August 29, 2024

gi

no module named gi!

from fastfusion.

devkapilbansal avatar devkapilbansal commented on August 29, 2024

@phamvandan ValueError: Namespace Gtk is already loaded with version 3.0 when using gi.require_version('Gtk','2.0')

from fastfusion.

phamvandan avatar phamvandan commented on August 29, 2024

@imohamadhoseins pip install gi

from fastfusion.

phamvandan avatar phamvandan commented on August 29, 2024

@devkapilbansal Oh, i don't know this error

from fastfusion.

phamvandan avatar phamvandan commented on August 29, 2024

@devkapilbansal , yeah, I see.

from fastfusion.

Achilles107 avatar Achilles107 commented on August 29, 2024

HELLO GUYS, After many months work with this error, I have just passed this by append this two lines in the head of the main python file. It will specify only version, which you want when your environment have many version of GTK. Good lucks !
import gi
gi.require_version('Gtk', '2.0')

Thanks for the fix. Really helped

from fastfusion.

aaaaangel avatar aaaaangel commented on August 29, 2024

HELLO GUYS, After many months work with this error, I have just passed this by append this two lines in the head of the main python file. It will specify only version, which you want when your environment have many version of GTK. Good lucks !
import gi
gi.require_version('Gtk', '2.0')

Thanks for the fix. Really helped

@Achilles107 where is the main python file in this repository?

from fastfusion.

Vigneshpadoor avatar Vigneshpadoor commented on August 29, 2024

@devkapilbansal how did you solve the problem? were you able to use both together?

from fastfusion.

devkapilbansal avatar devkapilbansal commented on August 29, 2024

@Vigneshpadoor I use opencv only there removing matplotlib and doing the changes in separate files

from fastfusion.

u4david avatar u4david commented on August 29, 2024

import gi
gi.require_version('Gtk', '2.0')

Could you elaborate how to implement the fix above pls?
Thank you

Fix related to this error running eviacam:
(eviacam:22012): Gtk-ERROR **: 15:04:20.718: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
Trace/breakpoint trap (core dumped)

from fastfusion.

cjchng avatar cjchng commented on August 29, 2024

In testing gtkmm3.x with openCV used, it will conflict with the default GTK+ 2.x installed. To this issue, I rebuild OpenCV by unchecking the option of GTK+ 2.x, then this error message disappears.

from fastfusion.

MagnusErler avatar MagnusErler commented on August 29, 2024

HELLO GUYS, After many months work with this error, I have just passed this by append this two lines in the head of the main python file. It will specify only version, which you want when your environment have many version of GTK. Good lucks ! import gi gi.require_version('Gtk', '2.0')

How can this be implemented in c++?

from fastfusion.

phamvandan avatar phamvandan commented on August 29, 2024

from fastfusion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.