1

I have a trouble with the import of "blabel", a python library to elaborate different labels for sticker's printing.

I used the example given in the library's github: https://github.com/Edinburgh-Genome-Foundry/blabel

from blabel import LabelWriter

label_writer = LabelWriter("item_template.html",
                           default_stylesheets=("style.css",))
records= [
    dict(sample_id="s01", sample_name="Sample 1"),
    dict(sample_id="s02", sample_name="Sample 2")
]

label_writer.write_labels(records, target='qrcode_and_label.pdf')

But as a result I got the next output:

OSError: cannot load library 'gobject-2.0-0': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0'

How can I fix this issue?

willyro93
  • 143
  • 1
  • 10
  • 1
    How did you install it? – msanford Nov 09 '21 at 18:20
  • 1
    As the pypi says: pip install blabel – willyro93 Nov 09 '21 at 18:31
  • https://pypi.org/project/blabel/ – willyro93 Nov 09 '21 at 18:32
  • 1
    I asked because you linked the github repository, and there's always a chance that you may have simply cloned it - which seemed possible as you appeared to be missing dependencies. As this is clearly not the case, I'm afraid I'm at a loss. – msanford Nov 09 '21 at 19:21
  • 1
    Don't worry. In case you need to use such library, or you find some day the 'gobject-2.0-0' issue, the solution will be here posted here by me, I could find a way to make it work. Thanks for your time. – willyro93 Nov 10 '21 at 18:36

1 Answers1

0

The solution is based on this question made in Stack Overflow: OSError: cannot load library 'gobject-2.0': error 0x7e

The person asking (@echo-foe) got a solution for himself, and I found another way similar to his solution, you need to install the GTK environment from GitHub https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases

And then I specified the directory of the file to the PATH list. It worked for me.

The directory for the PATH is usually something like this:

C:\Program Files\GTK3-Runtime Win64\lib

Hope this helps anyone with the same trouble.

willyro93
  • 143
  • 1
  • 10