You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 3, 2018. It is now read-only.
I'd submit a patch, but I'm pretty new to libraries and git too so... here is what I did to make huBarcode work for python3 (or... at least the parts I need to generate a datamatrix):
Example from "hubarcode/datamatrix/init.py":
from textencoder import TextEncoder
Must be replaced by this:
from .textencoder import TextEncoder
This is only an example. Almost every .py-File needs to be update
Example from "hubarcode/datamatrix/placement.py", line 105:
def place_standard_shape(self, (posx, posy), codeword):
Must be replaced with:
def place_standard_shape(self, posx_posy, codeword):
posx, posy = posx_posy
"hubarcode/datamatrix/renderer.py", the StringIO has been restructured. To Import it in a Python2 and Python3 compatible way use:
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
Last but not least, remember to install Pillow instead of PIL as PIL isn't Python3 compatible either.
The text was updated successfully, but these errors were encountered:
I'm not sure what the plans the huBarcode maintainers have, but we've started a fork that is Python 3 only, which we intend to clean up and develop further. Testing and contributions welcome. https://github.com/mmulqueen/pyStrich
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Too bad huBarcode doesn't work with Python3.
I'd submit a patch, but I'm pretty new to libraries and git too so... here is what I did to make huBarcode work for python3 (or... at least the parts I need to generate a datamatrix):
from textencoder import TextEncoder
Must be replaced by this:
from .textencoder import TextEncoder
This is only an example. Almost every .py-File needs to be update
def place_standard_shape(self, (posx, posy), codeword):
Must be replaced with:
def place_standard_shape(self, posx_posy, codeword):
posx, posy = posx_posy
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
The text was updated successfully, but these errors were encountered: