eoyilmaz / displaycal-py3

DisplayCAL Modernization Project
https://eoyilmaz.github.io/displaycal-py3/
GNU General Public License v3.0
861 stars 60 forks source link

Fail to open Calibrate window #415

Closed marillat closed 1 month ago

marillat commented 1 month ago

With displaycal 3.9.13 called with --debug

Reloading /home/marillat/.config/dispcalGUI/dispcalGUI.ini
[D] get_set_display
[D] display_ctrl_handler called for ID -2023 display_ctrl event type 10013 EVT_CHOICE
┌──────────────────────────────────────────────────────────────────────────────┐
│ b'Traceback (most recent call last):\n  File "<string>", line 1, in          │
│ <module>\nModuleNotFoundError: No module named \'wxMeasureFrame\''           │
└──────────────────────────────────────────────────────────────────────────────┘
[D] focus_handler called for None <class 'wx._core.Menu'>, event type 10017 EVT_TOOL_RANGE
[D] Last focused control: ID -2423 calibrate_and_profile_btn <class 'DisplayCAL.wxwindows.BorderGradientButton'>
Executing BaseApp.OnExit()
eoyilmaz commented 1 month ago

Please use the bug report format and supply steps to reproduce.

marillat commented 1 month ago

Launch displaycal Click on the Calibrate & profile buton displaycal crash

eoyilmaz commented 1 month ago

You should start from how did you install DisplayCAL.

marillat commented 1 month ago

Why ? displaycal is installed from the Debian package.

eoyilmaz commented 1 month ago

It really depends on how you have installed. Let me check now if I can reproduce this.

marillat commented 1 month ago

displaycal has been always working with files installed like this

https://packages.debian.org/sid/amd64/displaycal/filelist

eoyilmaz commented 1 month ago

Yes, but sometimes, unfortunately, we introduce bugs, and knowing the way you installed helps to pinpoint the bug.

marillat commented 1 month ago

Yes, I do the same (sometimes) with the Debian packaging.

eoyilmaz commented 1 month ago
┌──────────────────────────────────────────────────────────────────────────────┐
│ b'Traceback (most recent call last):\n  File "<string>", line 1, in          │
│ <module>\nModuleNotFoundError: No module named \'wxMeasureFrame\''           │
└──────────────────────────────────────────────────────────────────────────────┘

I know why this is happening. 6c00bfb changed the pydir and DisplayCAL.display_cal.MainFrame.start_measurement_subprocess() is referencing that path, which now shows the parent of the previous value and this only effects Linux systems as MacOS and Windows are using a different code path to show the dialog.

Should be easy to fix.

eoyilmaz commented 1 month ago

ah no, my mistake, the pydir is still pointing to the same folder. But that script should import DisplayCAL.wxMeasureFrame and not wxMeasureFrame directly.

eoyilmaz commented 1 month ago

I'm using a virtualbox image for Debian 12, but I can't seem to be able to build and install wxPython. I'll try with Ubuntu 24.10 which was building okay. I should hit to the same error, if I'm able to start the calibration with the virtual monitor at all.

eoyilmaz commented 1 month ago

hmm... ArgyllCMS executables are not working under aarch64 🤷‍♂️

let me do it remotely then, I'll update the code, and I'll be appriciated if you can try running it.

eoyilmaz commented 1 month ago

@marillat can you try running the following to build and run from source:

cd ~
sudo apt-get install build-essential dbus libglib2.0-dev pkg-config libgtk-3-dev libxxf86vm-dev python3-dev python3-venv
git clone https://www.github.com/eoyilmaz/displaycal-py3
cd displaycal-py3
git fetch --all
git checkout 415-fail-to-open-calibrate-window
SYSTEM_PYTHON=python3 python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt -r requirements-dev.txt
python -m build
pip install dist/DisplayCAL-3.9.*.whl

and you should now be able to run:

python -m DisplayCAL

and for any consequent runs on a new terminal you can run the following:

cd ~/displaycal-py3
source .venv/bin/activate
python -m DisplayCAL
marillat commented 1 month ago

As I'm saying before, I'm the Debian maintainer and we don't use python virtual environment to build the package but pybuild.

Anyway commit https://github.com/eoyilmaz/displaycal-py3/commit/90b7192300f991ff7d6cbdac7c7ba5c1094ae38d fix this issue.

eoyilmaz commented 1 month ago

As I'm saying before, I'm the Debian maintainer and we don't use python virtual environment to build the package but pybuild.

oh sorry, my bad, didn't understand you are the Debian maintainer, cool!

I'm glad that the problem is solved. I'll do a new release this week, I'll let you know 👍

marillat commented 1 month ago

I've already uploaded a new package 3.9.13-4 not yet available in unstable.

Thanks for your work and fast bug fixes.

eoyilmaz commented 1 month ago

3.9.14 is released