Skip to content

'HarmCategory' has no attribute 'HARM_CATEGORY_CIVIC_INTEGRITY' #202

@tommicarraro

Description

@tommicarraro

System Specs

  • OS: Fedora Linux 42
  • Desktop Environment: KDE Plasma 6.3.5
  • App Version: Built from source (commit d92a039)

Issue

The application launches correctly when freshly cloned.
However, after adding the Gemini API key to the configuration, the app crashes immediately, as well as after every restart.

Error Traceback

Command: python3 /home/XXX/WritingTools/Windows_and_Linux/main.py

2025-06-13 10:04:40,635 - DEBUG - Loading config from config.json
2025-06-13 10:04:40,635 - DEBUG - Config loaded successfully
2025-06-13 10:04:40,636 - DEBUG - Loading options from options.json
2025-06-13 10:04:40,636 - DEBUG - Options loaded successfully
2025-06-13 10:04:40,636 - DEBUG - Config found, setting up hotkey and tray icon
Traceback (most recent call last):
  File "/home/XXX/WritingTools/Windows_and_Linux/main.py", line 20, in <module>
    main()
    ~~~~^^
  File "/home/XXX/WritingTools/Windows_and_Linux/main.py", line 14, in main
    app = WritingToolApp(sys.argv)
  File "/home/XXX/WritingTools/Windows_and_Linux/WritingToolApp.py", line 88, in __init__
    self.current_provider.load_config(self.config.get("providers", {}).get(provider_name, {}))
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/XXX/WritingTools/Windows_and_Linux/aiprovider.py", line 187, in load_config
    self.after_load()
    ~~~~~~~~~~~~~~~^^
  File "/home/XXX/WritingTools/Windows_and_Linux/aiprovider.py", line 303, in after_load
    HarmCategory.HARM_CATEGORY_CIVIC_INTEGRITY: HarmBlockThreshold.BLOCK_NONE,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'HarmCategory' has no attribute 'HARM_CATEGORY_CIVIC_INTEGRITY'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions