Skip to content

Pyside#383

Merged
FelipeDefensor merged 75 commits intoTimeLineAnnotator:devfrom
azfoo:pyside
Mar 20, 2026
Merged

Pyside#383
FelipeDefensor merged 75 commits intoTimeLineAnnotator:devfrom
azfoo:pyside

Conversation

@azfoo
Copy link
Collaborator

@azfoo azfoo commented Feb 19, 2026

  • Port from PyQt to Pyside with Nuitka.
  • Centralises dependencies (requirements.txt, setup.cfg) into the pyproject file.
  • Fixes missing env file, with allowance for including custom env files.
  • On Linux, if missing system dependencies are encountered, attempt to identify all missing files, and redirect the user to troubleshoot and install these dependencies (see TimeLineAnnotator/web-frontend#43).
  • Disable CLI in built exe.

Release: https://github.com/azfoo/TiLiA/releases/tag/pyside-no-cli

if "=> not found" in result:
if "__compiled__" not in globals():
msg = [
"Could not locate the necessary libraries to run TiLiA. libqxcb.so file not found.",
Copy link
Collaborator

@FelipeDefensor FelipeDefensor Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libqxcb.so was just an example, other libraries may be missing. What I got as an error was something like:

Could not find libqxb.so.
<Dump>
<Helpful Python error>

My suggestion was to extract the missing library name from the first line and put it in the end with the helpful Python error. Do you think this is worth it, or is it too much work?

Copy link
Collaborator Author

@azfoo azfoo Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We look for the libqxcb file because that's the one that causes issues with not starting up if its linked dependencies are not found. The file structure of the compiled binary is known, which is how we can search directly for this file.
We do print the missing libraries if it is an exe (see lines 40+).
But if it isn't an exe (that's the bit you've selected), the location of this file depends on other factors. It would be a little complicated to try and look for the file. I reckon an ImportError is unlikely to occur in our built exe (hence the contact info), and more likely as a missing system dependency in a source compiled run (hence the error message). The file dump of the directory contents will not locate the missing file because it will not be there if built from source. Although I suppose I could still link to the debug process that is in the updated help page. (Not sure if I should. Just realised that I have no idea where the file would be if it isn't built...)

@FelipeDefensor
Copy link
Collaborator

Any idea why the Mac release are so much bigger?

@azfoo
Copy link
Collaborator Author

azfoo commented Feb 20, 2026

Any idea why the Mac release are so much bigger?

So in practice, the unzipped mac file in the previous versions is also about 700MB. In this one, I've realised that adding the line to zip it does nothing to the actual size (zipped or not, it is still about 700). No idea why that is. Should I remove the lines on zipping it?

@FelipeDefensor
Copy link
Collaborator

FelipeDefensor commented Feb 20, 2026

Building on my Linux works :). Have you ever got some error like this when running the binary: -bash: source: build/linux/exe/TiLiA-v0.5.15.0-felipe-test-linux: cannot execute binary file?

Maybe the problem is on my side. A quick search shows that the most common cause for that message is trying to run a binary built for a different architecture, but that couldn't have happened as I built the binary myself, right? I will keep debugging this on Monday.

@azfoo
Copy link
Collaborator Author

azfoo commented Feb 20, 2026

does chmod ugo+x (the file) then running the file help?

@FelipeDefensor
Copy link
Collaborator

When running the binaries in a command line in Windows, I get this error:

 File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\importlib\metadata\__init__.py", line 397, in from_name
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\__main__.py", line 72, in <module>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\__main__.py", line 62, in main
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\boot.py", line 9, in <module tilia.boot>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\app.py", line 10, in <module tilia.app>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\errors.py", line 3, in <module tilia.errors>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\requests\__init__.py", line 2, in <module tilia.requests>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\requests\post.py", line 5, in <module tilia.requests.post>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\log.py", line 11, in <module tilia.log>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\dirs.py", line 6, in <module tilia.dirs>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\constants.py", line 19, in <module tilia.constants>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\importlib\metadata\__init__.py", line 861, in distribution
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\importlib\metadata\__init__.py", line 399, in from_name
importlib.metadata.PackageNotFoundError: No package metadata was found for TiLiA

Double clicking does nothing.

@FelipeDefensor
Copy link
Collaborator

does chmod ugo+x (the file) then running the file help?

No, but I figured it out. I was trying to run it with source, but what works is .\<the file>.

@FelipeDefensor
Copy link
Collaborator

FelipeDefensor commented Feb 23, 2026

So in practice, the unzipped mac file in the previous versions is also about 700MB. In this one, I've realised that adding the line to zip it does nothing to the actual size (zipped or not, it is still about 700). No idea why that is. Should I remove the lines on zipping it?

Ok, please remove them. We can investigate the unreasonable size later.

Edit: For the current release in the website, the unzipped Silicon binary is "only" 173MB on my machine, so it seems PyInstaller was indeed doing a better job at this.

@FelipeDefensor
Copy link
Collaborator

FelipeDefensor commented Feb 24, 2026

I finally got my hands on a Mac. Followed the build instructions, and they work perfectly. :)

Edit: which means the only important thing left is to fix that metadata issue on Windows, right?

@FelipeDefensor
Copy link
Collaborator

So in practice, the unzipped mac file in the previous versions is also about 700MB. In this one, I've realised that adding the line to zip it does nothing to the actual size (zipped or not, it is still about 700). No idea why that is. Should I remove the lines on zipping it?

For the record: the executable I built locally ended up with ~1.4GB.

@FelipeDefensor
Copy link
Collaborator

I built the binary from scratch on Windows and got the same error :(.

Traceback (most recent call last):
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\__main__.py", line 72, in <module>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\__main__.py", line 62, in main
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\boot.py", line 9, in <module tilia.boot>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\app.py", line 10, in <module tilia.app>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\errors.py", line 3, in <module tilia.errors>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\requests\__init__.py", line 2, in <module tilia.requests>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\requests\post.py", line 5, in <module tilia.requests.post>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\log.py", line 11, in <module tilia.log>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\dirs.py", line 6, in <module tilia.dirs>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\constants.py", line 19, in <module tilia.constants>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\importlib\metadata\__init__.py", line 861, in distribution
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\importlib\metadata\__init__.py", line 399, in from_name
importlib.metadata.PackageNotFoundError: No package metadata was found for TiLiA

@FelipeDefensor FelipeDefensor self-requested a review March 17, 2026 10:15
Copy link
Collaborator

@FelipeDefensor FelipeDefensor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my last comment.

@azfoo
Copy link
Collaborator Author

azfoo commented Mar 17, 2026

I built the binary from scratch on Windows and got the same error :(.

Traceback (most recent call last):
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\__main__.py", line 72, in <module>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\__main__.py", line 62, in main
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\boot.py", line 9, in <module tilia.boot>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\app.py", line 10, in <module tilia.app>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\errors.py", line 3, in <module tilia.errors>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\requests\__init__.py", line 2, in <module tilia.requests>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\requests\post.py", line 5, in <module tilia.requests.post>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\log.py", line 11, in <module tilia.log>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\dirs.py", line 6, in <module tilia.dirs>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\tilia\constants.py", line 19, in <module tilia.constants>
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\importlib\metadata\__init__.py", line 861, in distribution
  File "C:\Users\Felipe\AppData\Local\TiLiA\V0515~1.0\importlib\metadata\__init__.py", line 399, in from_name
importlib.metadata.PackageNotFoundError: No package metadata was found for TiLiA

Do you mind trying this? (I know the mac is missing, that's currently being built.)
It might be something to do with the egg-info file being missing. If not I'll have to do something about not using metadata.

@FelipeDefensor
Copy link
Collaborator

FelipeDefensor commented Mar 18, 2026

Do you mind trying this? (I know the mac is missing, that's currently being built.)
It might be something to do with the egg-info file being missing. If not I'll have to do something about not using metadata.

The Windows one seems to work! Do you know why am I not able to build it locally on Windows? Does the same happen to you? The Mac binary is not there yet, btw. I let a local Mac build running at home, will check it at the end of the day.

@azfoo
Copy link
Collaborator Author

azfoo commented Mar 18, 2026

Do you mind trying this? (I know the mac is missing, that's currently being built.)
It might be something to do with the egg-info file being missing. If not I'll have to do something about not using metadata.

The Windows one seems to work! Do you know why am I not able to build it locally on Windows? Does the same happen to you? The Mac binary is not there yet, btw. I let a local Mac build running at home, will check it at the end of the day.

If you're on the latest update, check that there is a TiLiA.egg-info file somewhere in the directory. If not, try doing a pip install -e . --group build again. Metadata is from the egg-info file, which is produced when doing a pip install.

@FelipeDefensor
Copy link
Collaborator

If you're on the latest update, check that there is a TiLiA.egg-info file somewhere in the directory. If not, try doing a pip install -e . --group build again. Metadata is from the egg-info file, which is produced when doing a pip install.

I pip installed dependencies again and there is a tilia.egg-info folder on the project root. Not sure it was there before. I am rebuilding the executable.

@FelipeDefensor
Copy link
Collaborator

I pip installed dependencies again and there is a tilia.egg-info folder on the project root. Not sure it was there before. I am rebuilding the executable.

I still get the same error 😢.

@FelipeDefensor
Copy link
Collaborator

Local Mac build works. Since we are being able to build on Windows on CI, how about we merge this and leave fixing the error I am getting as top priority for v0.6.1?

@FelipeDefensor
Copy link
Collaborator

Local Mac build works. Since we are being able to build on Windows on CI, how about we merge this and leave fixing the error I am getting as top priority for v0.6.1?

I was able to work around it by adding some logic to handle the PackageNotFoundError. I think this is something we should have anyway, as it prevents crashes production due to something relatively unimportant (getting TiLiA's version number, author name, etc).

We should still figure out what is going on here.

Copy link
Collaborator

@FelipeDefensor FelipeDefensor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am approving this before completely solving the metadata issue to try to keep the plan of releasing v0.6.0 today.

@FelipeDefensor
Copy link
Collaborator

Rebase worked out well, I am waiting for the checks to merge, but I won't be able to finish manual testing today. I'll see if I'm up for releasing on the weekend, if not, I'll get back to this on Monday.

@FelipeDefensor FelipeDefensor merged commit a961a89 into TimeLineAnnotator:dev Mar 20, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fail to run in Linux Failed to create wl_display (No such file or directory)

2 participants