bala4901
(Markus Bala)
November 3, 2020, 7:37pm
1
Hi,
After install Tryton client 5.8 (tryton-64bit-last.exe) on windows 10 64 bit, it shown the error. Seem like missing Library.
wowarcz
(Wojciech Warczakowski)
November 3, 2020, 7:43pm
2
Not only 64bit. I get the same message on 32bit.
Same for me on 4 different Win10 machines.
ced
(Cédric Krier)
November 3, 2020, 8:54pm
5
banknote
(Constantine Kurbatoff)
November 3, 2020, 9:14pm
6
A similar problem is discussed here:
opened 07:50PM - 30 Aug 20 UTC
closed 10:38AM - 02 Sep 20 UTC
## Description of the issue
Packaging Gtk apps in Windows with pyinstaller no… w gives an error that the Typelib for HarfBuzz version '0.0' is not found. Recent changes to Gtk/Pango are now including the typelib for HarfBuzz. I think we need to add a hook to include this typelib.
### Steps to Reproduce the Problem
1. Update msys2 and install pygobject:
```
$ pacman -Suy
$ pacman -S git mingw-w64-x86_64-gcc mingw-w64-x86_64-gtk3 \
mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cairo \
mingw-w64-x86_64-gobject-introspection mingw-w64-x86_64-python \
mingw-w64-x86_64-python-gobject mingw-w64-x86_64-python-cairo \
mingw-w64-x86_64-python-pip
```
2. `python -m venv .venv`
3. `source .venv/bin/activate`
4. `pip install pygobject pyinstaller==3.6`
5. `pyinstaller --exclude-module tk --exclude-module tcl --exclude-module _tkinter helloworld.py`
3. `./dist/helloworld/helloworld.exe`
```
$ ./dist/helloworld/helloworld.exe
gi.RepositoryError: Typelib file for namespace 'HarfBuzz', version '0.0' not found
```
(see full stacktrace below)
Expected behavior:
Hello world PyGObject example runs fine when packaged with pyinstaller:
```
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
window = Gtk.Window(title="Hello World")
window.show()
window.connect("destroy", Gtk.main_quit)
Gtk.main()
```
## Context information (for bug reports)
* Output of `pyinstaller --version`: 3.6 (I can't use latest because of https://github.com/pyinstaller/pyinstaller/issues/5058)
* Version of Python: 3.8.5
* Platform: Windows MSYS2 x86_64
* Did you also try this on another platform? Does it work there? N/A
### Make sure [everything is packaged correctly](https://github.com/pyinstaller/pyinstaller/wiki/How-to-Report-Bugs#make-sure-everything-is-packaged-correctly)
* [X] start with clean installation
* [ ] use the latest development version
* [X] Run your frozen program **from a command window (shell)** — instead of double-clicking on it
* [X] Package your program in **--onedir mode**
* [X] Package **without UPX**, say: use the option `--noupx` or set `upx=False` in your .spec-file
* [X] Repackage you application in **verbose/debug mode**. For this, pass the option `--debug` to `pyi-makespec` or `pyinstaller` or use `EXE(..., debug=1, ...)` in your .spec file.
### A minimal example program which shows the error
```
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
window = Gtk.Window(title="Hello World")
window.show()
window.connect("destroy", Gtk.main_quit)
Gtk.main()
```
### Stacktrace / full error message
```
$ ./dist/helloworld/helloworld.exe
Traceback (most recent call last):
File "gi/importer.py", line 138, in load_module
File "gi/module.py", line 265, in get_introspection_module
File "gi/module.py", line 117, in __init__
gi.RepositoryError: Typelib file for namespace 'HarfBuzz', version '0.0' not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "helloworld.py", line 3, in <module>
from gi.repository import Gtk
File "gi/importer.py", line 140, in load_module
ImportError: Typelib file for namespace 'HarfBuzz', version '0.0' not found
[10892] Failed to execute script helloworld
```
Gtk now includes the typelib for HarfBuzz:
```
$ g-ir-inspect.exe Gtk --print-shlibs --print-typelibs
shlib: libgtk-3-0.dll
typelib: GLib-2.0
typelib: Gdk-3.0
typelib: HarfBuzz-0.0
typelib: GdkPixbuf-2.0
typelib: cairo-1.0
typelib: GObject-2.0
typelib: Pango-1.0
typelib: Gio-2.0
typelib: GModule-2.0
typelib: Atk-1.0
```
The shared library is libharfbuzz-gobject-0.dll:
```
$ g-ir-inspect.exe HarfBuzz --print-shlibs --print-typelibs
shlib: libharfbuzz-gobject-0.dll
typelib: GObject-2.0
typelib: GLib-2.0
```
## Things I Have Tried So Far
I created a new hook called hook-gi.repository.HarfBuzz.py with:
```
from PyInstaller.utils.hooks import get_gi_typelibs
binaries, datas, hiddenimports = get_gi_typelibs('HarfBuzz', '0.0')
```
`18021 WARNING: Hidden import "gi.repository.HarfBuzz" not found!`
It could be solved by some edits in the source files. Because I didn’t deploy Tryton in a Win64-only environment yet, have not solved that issue. But suggest using these recommendations.
Constantine.
PS:
Example of adding of the hook:
committed 01:45AM - 01 Sep 20 UTC
Fixes #5129 which is an error for gi.RepositoryError: Typelib file for
namespace… 'HarfBuzz', version '0.0' not found. The cause of this error
is that Gtk and Pango now include HarfBuzz-0.0 as a typelib that
needs to be loaded with the other libraries. This change adds hooks for
this typelib.
ced
(Cédric Krier)
November 3, 2020, 9:23pm
7
The prebuild seems to be working on my 2 machines. When I tried to connect it to my tryton instance I got an incompatible error. Thanks
edbo
November 4, 2020, 7:33pm
9
Make sure you have also tryton server 5.8 on your server.
I had no problem with connection to demo5.8.tryton.org
Is there a time frame for completion of the 5.8 Desktop version? Thanks
edbo
November 9, 2020, 6:14pm
11
When you look at https://downloads-cdn.tryton.org/5.8/ you see a -r1 version. Use that one.
We are stilling having issue with the Desktop client beyond just HarfBuzz.
We never had issue on the 5.6 client like this. But we moved to the client as per Ced so we could have adjustable fields so we could see all the columns . Now we are having issues this is impacting workflow. Thanks
pokoli
(Sergi Almacellas Abellana)
November 11, 2020, 8:20am
13
This seems to a unrelated error. It seems a bug in the new version but may be not related to the desktop client.
It will be great if you can explain us how to reproduce in order to determine the origin of it and also share the full traceback (the content of your capture) to properly understand what happens.
Pokoli ty for the replay. share the full traceback (the content of your capture. I am not sure what this means or how to get the full traceback? That error popped up after install the new 5.8Rc1 desktop client and trying to connect to our server. how can I provide the information you asked thanks
pokoli
(Sergi Almacellas Abellana)
November 12, 2020, 8:22am
15
THis means the content that is shown in the text area above the Report Bug link. This is an explanation of the error and allows developers to understand what is hapenning.
I have determined the error is coming from a custom module that our Dev has created he is looking into the root cause thank you for the help!