Closed lpm0073 closed 1 year ago
I'm not sure I understand the impact of this change. Could you please give more information?
Nope, I still don't get it. You are showing a sample from a YAML file but the code extracts values from JSON. I do not understand what issue the proposed change is supposed to fix.
@lpm0073 Can you please give more details about what you are trying to achieve here?
I will close this because of the lack of response. If you want to re-open, please describe what issue this is supposed to fix.
hi @regisb, not sure what additional information i can provide, but, closing the PR didn't help anyone; least of all the repo maintainers here. recasting my original text from above: if the value of apple_pay_merchant_id_domain_association contains a CR/LF then the code will raise an exception. that's it, really. there's more technical info here about the exact nature of my 10-character PR: https://docs.python.org/3/library/json.html. of note:
If strict is false (True is the default), then control characters will be allowed inside strings. Control characters in this context are those with character codes in the 0–31 range, including '\t' (tab), '\n', '\r' and '\0'.
i worked around this btw, and so this bug doesn't block me in any way, but it'd be great if the fix found its way into the master branch at some point. thanks :)
if the value of apple_pay_merchant_id_domain_association contains a CR/LF then the code will raise an exception
This is exactly the information that I needed in order to understand the purpose of this PR. With this information I am now able to reproduce the issue. To be quite thorough you should have mentioned that the raised error is JSONDecodeError: Invalid control character at: line 1 column xx (char xx)
.
With this in mind, I'd like to suggest a different fix. The current implementation dumps ECOMMERCE_PAYMENT_PROCESSORS
to json before loading it back again, which is quite useless. Instead, could we simply write:
common_payment_processor_config = {{ ECOMMERCE_PAYMENT_PROCESSORS }}
Could you please test this change @lpm0073?
More generally, when I look at an issue report, I need at least two things:
tutor local start
triggers a JSONDecodeError".tutor local start
".Without these two elements it may be really difficult for me to guess what is going on, especially with a complex plugin such as ecommerce, which I use as seldom as possible...
Also, I closed the PR because you did not reply to either my July 26 or September 8th comments. I think it's fair to close the PR in such cases, as I try to keep the list of open PRs/issues as short as possible at all times. Also, there is always the possibility of re-opening the PR, as I just did.
@lpm0073 Did you see my comment above? What are your thoughts on the proposed change?
… }}, strict=False) to allow multiline content