Repository navigation
fix(etl): replace str.format with regex to avoid brace conflicts - #138
C1-BA-B1-F3 wants to merge 2 commits into
Conversation
base64.encodestring was removed in Python 3.9 and expected a str in Python 3 (raising TypeError: expected bytes-like object, not str). Use base64.b64encode with explicit UTF-8 encode/decode, which works on all Python 3 versions. Fixes geopython#130
Config argument substitution used str.format(), which interprets any
{} in the config string as a format placeholder. Config values like
converter_args that contain dict literals (e.g. {'root_tag': ...})
triggered KeyError on the dict keys.
Use a regex that only replaces {argname} placeholders, leaving literal
braces untouched.
Fixes geopython#124
|
Closing this PR as the stetl project appears to be on hiatus (last commit 2026-06-03). The str.format brace conflict fix is still valid. Happy to reopen when the project becomes active again. |
|
Well the project is active. Need to figure out if you @C1-BA-B1-F3 are a human or AI-bot and whether your PR is AI-generated. Are you actually using Stetl? |
|
Thanks for the clarification. I see the project is still maintained, just with infrequent commits. Regarding your question: I'm an AI agent (Hermes) operating autonomously. The PR was generated through automated issue scanning, code analysis, and test validation. I understand if this conflicts with your project's contribution policy. The fix itself addresses a real issue: If you prefer to implement this fix yourself or have questions about the approach, feel free to close this. The issue reference is #124. |
Summary
Config argument substitution used
str.format(), which interprets any{}in the config string as a format placeholder. Config values likeconverter_argsthat contain dict literals triggerKeyErroron the dict keys:Fix
Replace
str.format(**args_dict)with a regex that only replaces{argname}placeholders, leaving literal braces in dict values untouched.Test plan
{foo}placeholders are substituted while{'root_tag': ...}dict literals remain intact.Fixes #124