dynobo / normcap

OCR powered screen-capture tool to capture information instead of images

Home Page:https://dynobo.github.io/normcap/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR - normcap.screengrab.dbus_portal:110 - No response from xdg-portal within 10s!

vitamin opened this issue · comments

What happened?

./NormCap-0.5.4-x86_64.AppImage
21:01:12 - ERROR - normcap.screengrab.dbus_portal:110 - No response from xdg-portal within 10s!
21:01:12 - CRITICAL - normcap:148 - Uncaught exception!

How did you install NormCap?

AppImage (Linux)

Operating System + Version?

No response

[Linux only] Display Server (DS) + Desktop environment (DE)?

No response

Debug log output?*

./NormCap-0.5.4-x86_64.AppImage 
21:01:12 - ERROR   - normcap.screengrab.dbus_portal:110 - No response from xdg-portal within 10s!
21:01:12 - CRITICAL - normcap:148 - Uncaught exception!
Traceback (most recent call last):
  File "/tmp/.mount_NormCaIyLltd/usr/app/normcap/screengrab/dbus_portal.py", line 223, in capture
    result = _synchronized_capture(interactive=False)
  File "/tmp/.mount_NormCaIyLltd/usr/app/normcap/screengrab/dbus_portal.py", line 200, in _synchronized_capture
    raise error
TimeoutError: No response from xdg-portal within 10s!

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/.mount_NormCaIyLltd/usr/python/lib/python3.10/runpy.py", line 224, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/tmp/.mount_NormCaIyLltd/usr/python/lib/python3.10/runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/tmp/.mount_NormCaIyLltd/usr/python/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/tmp/.mount_NormCaIyLltd/usr/app/normcap/__main__.py", line 6, in <module>
    run()
  File "/tmp/.mount_NormCaIyLltd/usr/app/normcap/app.py", line 101, in run
    app, tray = _prepare()
  File "/tmp/.mount_NormCaIyLltd/usr/app/normcap/app.py", line 94, in _prepare
    tray = SystemTray(app, vars(args))
  File "/tmp/.mount_NormCaIyLltd/usr/app/normcap/gui/tray.py", line 145, in __init__
    self._show_windows(delay_screenshot=delay_screenshot)
  File "/tmp/.mount_NormCaIyLltd/usr/app/normcap/gui/tray.py", line 202, in _show_windows
    screenshots = self._take_screenshots(delay=delay_screenshot)
  File "/tmp/.mount_NormCaIyLltd/usr/app/normcap/gui/tray.py", line 500, in _take_screenshots
    screens = screengrab.capture()
  File "/tmp/.mount_NormCaIyLltd/usr/app/normcap/screengrab/main.py", line 45, in capture
    return capture_func()
  File "/tmp/.mount_NormCaIyLltd/usr/app/normcap/screengrab/dbus_portal.py", line 225, in capture
    raise ScreenshotTimeoutError("Timeout when taking screenshot!") from exc
normcap.screengrab.exceptions.ScreenshotTimeoutError: Timeout when taking screenshot!
21:01:12 - CRITICAL - normcap:151 - System info: {'normcap_version': '0.5.4', 'python_version': '3.10.13', 'cli_args': '-c', 'is_briefcase_package': True, 'is_flatpak_package': False, 'is_appimage_package': True, 'platform': 'linux', 'desktop_environment': <DesktopEnvironment.GNOME: 1>, 'display_manager_is_wayland': True, 'pyside6_version': '6.6.1', 'qt_version': '6.6.1', 'qt_library_path': '/tmp/.mount_NormCaIyLltd/usr/app_packages/PySide6/Qt/plugins, /tmp/.mount_NormCaIyLltd/usr/python/bin', 'locale': 'DEFAULT', 'config_directory': PosixPath('/home/ww/.config/normcap'), 'resources_path': PosixPath('/tmp/.mount_NormCaIyLltd/usr/app/normcap/resources'), 'tesseract_path': PosixPath('/tmp/.mount_NormCaIyLltd/usr/bin/tesseract'), 'tessdata_path': PosixPath('/home/ww/.config/normcap/tessdata'), 'envs': {'TESSDATA_PREFIX': None, 'LD_LIBRARY_PATH': None}, 'screens': [Screen(left=1024, top=1080, right=2943, bottom=2159, device_pixel_ratio=1.0, index=0, screenshot=None), Screen(left=2944, top=0, right=6783, bottom=2159, device_pixel_ratio=1.0, index=1, screenshot=None), Screen(left=0, top=1392, right=1023, bottom=2159, device_pixel_ratio=1.0, index=2, screenshot=None)]}
21:01:12 - CRITICAL - normcap:152 - Unfortunately, NormCap has to be terminated due to an unknown problem.
Please help improve NormCap by reporting this error, including the output above, on
https://github.com/dynobo/normcap/issues/new
Thanks!

fix by this https://stackoverflow.com/questions/69828508/warning-ignoring-xdg-session-type-wayland-on-gnome-use-qt-qpa-platform-wayland

Disabled Wayland by uncommenting WaylandEnable=false in the /etc/gdm3/custom.conf
Add QT_QPA_PLATFORM=xcb in /etc/environment
Check whether you are on Wayland or Xorg using:
echo $XDG_SESSION_TYPE