Aeoll / ae_SVG

SVG Importer and Exporter for Houdini
GNU Lesser General Public License v3.0
101 stars 10 forks source link

Hi #10

Open Abracadd opened 1 year ago

Abracadd commented 1 year ago

Thank for great TOOL !

How to fix error :

Error Invalid source /obj/geo1/SVG_Import1/SVG_IMPORT_UPDATED Error: Python error: Traceback (most recent call last): File "", line 12, in File "C:\Program Files\Side Effects Software\Houdini 19.5.368\python39\lib\site-packages-forced\shiboken2\files.dir\shibokensupport__feature__.py", line 142, in _import return original_import(name, *args, **kwargs) ModuleNotFoundError: No module named 'tinycss' .

handcraftedcc commented 11 months ago

I was able to fix the issue.

1: Rename the folder: python3.7libs to python3.9libs

2: In the python node called: SVG_IMPORT_UPDATED replace this code:

def hexToRGB(hexstring):
    hexstring = hexstring.replace("#", "")  # strip hash
    # Case for hex triplet
    if len(hexstring) == 3:
        hexstring = "".join([x * 2 for x in hexstring])
    rgbcol = struct.unpack('BBB', hexstring.decode('hex'))
    rgbcol = [x / 255.0 for x in rgbcol]
    return rgbcol

with

def hexToRGB(hexstring):
    hexstring = hexstring.replace("#", "")  # strip hash
    # Case for hex triplet
    if len(hexstring) == 3:
        hexstring = "".join([x * 2 for x in hexstring])
    rgbcol = struct.unpack('BBB', bytes.fromhex(hexstring))
    rgbcol = [x / 255.0 for x in rgbcol]
    return rgbcol

That fixed things for me!

handcraftedcc commented 11 months ago

Actually it seems that this issue is fixed in the main AE lib release. So just download that!

Abracadd commented 11 months ago

 Thank you very !!!   

Понедельник, 24 июля 2023, 2:44 +03:00 от Handcrafted Media @.***>:     I was able to fix the issue.

1 : Rename the folder: python3.7libs to python3.9libs

2 : In the python node called: SVG_IMPORT_UPDATED replace this code:

def hexToRGB(hexstring): hexstring = hexstring.replace("#", "") # strip hash

Case for hex triplet

if len(hexstring) == 3: hexstring = "".join([x * 2 for x in hexstring]) rgbcol = struct.unpack('BBB', hexstring.decode('hex')) rgbcol = [x / 255.0 for x in rgbcol] return rgbcol

with def hexToRGB(hexstring): hexstring = hexstring.replace("#", "") # strip hash

Case for hex triplet

if len(hexstring) == 3: hexstring = "".join([x * 2 for x in hexstring]) rgbcol = struct.unpack('BBB', bytes.fromhex(hexstring)) rgbcol = [x / 255.0 for x in rgbcol] return rgbcol

That fixed things for me! — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you authored the thread. Message ID: <Aeoll/ae_SVG/issues/10/1646992061 @ github . com>    

А А