-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added small section to fix an issue with QGIS expression #251
Conversation
…hen locating icons
Thanks for the PR and the hint for the issue. I would prefer a solution that not just removes a stringified 'b' char but one that assures, that not a bytes string will be incorrectly stringified in the first place. Would you mind doing that? Otherwise I can do it myself. |
I will look into this |
Awesome, thanks a lot! |
I am having a hard time tracking down where the byte object if being converted to a string. I would have bet money that the fix below in the _load_sprite_data would have fixed it since str('byte object') is not the proper way to convert but it must be elsewhere. Any idea would help because you know the code better but I will keep looking.
|
How about this?
Sorry I'm not a big help at the moment. I currently don't have a computer at home until next week. |
It is happening even when icon creation is not triggered so it is not in that section. It is weird because the layer names are labeled correctly it is just the QGIS expressions that are failing with that pesky |
And no worries on the help - you have certainly done a lot more work on this than me haha. I am just trying to find this thing. I am afraid it is going to be such a small thing that just leaving the |
Texts are now rendered correctly (see #211) |
Icons are still not rendered (see #255) |
I was seeing a bug that was berried deep in the QGIS symbols. When the expression it built like [path]+[icon_name]... the icon name was keeping the 'b' from the byte date after the http_get(). This small section will just check and make sure there is no standalone 'b' and if there is then it will remove. The QGIS expressions are no longer invalid after this fix.
To check for this issue in QGIS, you go to a symbol layer that is using icons, click on an icon > SVG Marker > scroll down to the expression that was inserted by the script and if that is red, it is invalid. That is this bug presenting. These few lines should fix that but also not cause other issues for examples where this is not happening.