Code Monkey home page Code Monkey logo

Comments (6)

SqAtx avatar SqAtx commented on July 21, 2024 1

It seems that I had the entire thing before - this is the start of the log:

2024-04-29 08:48:03,485 - WARNING - __init__:__init__:68 - Backend backend_caldav could not be loaded: ModuleNotFoundError("No module named 'caldav'")
Gtk-Message: 08:48:03.674: GtkDialog mapped without a transient parent. This is discouraged.
Traceback (most recent call last):
  File "<< GTG source >>/.local_build/install/lib/python3/dist-packages/GTG/gtk/browser/sidebar.py", line 286, in tags_setup_cb
    expander.set_indent_for_depth(True)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TreeExpander' object has no attribute 'set_indent_for_depth'. Did you mean: 'set_indent_for_icon'?
Gtk-Message: 08:48:03.678: GtkDialog mapped without a transient parent. This is discouraged.
Traceback (most recent call last):
  File "<< GTG source >>/.local_build/install/lib/python3/dist-packages/GTG/gtk/browser/sidebar.py", line 355, in tags_bind_cb
    expander = box.get_first_child()
               ^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_first_child'

and then everything repeats except the first line.

So, two things I'd like to do here:

  • Require GTK 4.10 explicitly
  • Avoid opening an exception dialog when one is already open

from gtg.

gycsaba96 avatar gycsaba96 commented on July 21, 2024

I am trying to reproduce the crash. Could you please provide more details about your setup? Does this happen with the default dataset? What is your exact GTK version?

There are two different errors:

  • AttributeError: 'TreeExpander' object has no attribute 'set_indent_for_depth'
    Based on the GTK documentation, this method is present from version 4.10. Is it possible that you have an older version?

  • AttributeError: 'NoneType' object has no attribute 'get_first_child'
    Maybe this is just a consequence of the first error. Could you please try to capture the beginning of your error message?

from gtg.

SqAtx avatar SqAtx commented on July 21, 2024

Thanks for looking at it! I have GTK 4.8.3, which seems to explain the problem. Let's make 4.10 an explicit requirement then (here, I think? and in the README).

It happens with the default dataset as well.

Could you please try to capture the beginning of your error message?

I'll try that when I have a minute! I assume I just need to disable the code that catches the exception and opens the dialog.

Side note: I'll probably create new issue for this, but I'd like to avoid "infinite dialogs" as a failure mode. Probably by detecting whether the error dialog is already open, and avoiding to open a new one.

from gtg.

gycsaba96 avatar gycsaba96 commented on July 21, 2024

I'll try that when I have a minute! I assume I just need to disable the code that catches the exception and opens the dialog.

You can also just redirect the error output to a file like this:

./launch.sh 2> output.txt

Then hit Ctrl + C in the terminal to exit GTG.

from gtg.

SqAtx avatar SqAtx commented on July 21, 2024

Some pieces of notes with my current understanding of the problem:

  1. The TaskPane is created
  2. It connects some "setup" signal to task_setup_cb()
  3. task_setup_cb() is called
  4. It tries to create a TaskBox
  5. The constructor of TaskBox calls self.expander.set_indent_for_depth(True), which raises an AttributeError in GTK<4.10
  6. task_setup_cb() propagates the exception
  7. It gets caught by the application, which creates an opens the ExceptionHandlerDialog
  8. Meanwhile, the "setup" signal is sent again, and we're back at step 3

Being on GTK 4.10 means that step 5 doesn't fail, but any exception in the TaskBox constructor has the same effect.

My current idea is to not open the ExceptionHandlerDialog of step 7 if one is already open.

from gtg.

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.