A math problem generator, created for the purpose of giving self-studying students and teaching organizations the means to easily get access to high-quality, generated math problems to suit their needs.
This PR attempts to fix problems with adoptGenerator.py, specifically, when running main() imported from makeReadme, as follows:
I've explained the path separators issue on #378. Basically, there's an unintended result when running adoptGenerator.py on my device and I highly suspect it's because Windows has backslash \ as path separator. I've replaced the hardcoded separator / with os.sep to make it work with as minimal change as possible.
There are Unicode symbols present in mathgenerator/funcs/geometry/basic_trigonometry.py. I've changed how makeReadme open file by adding the argument encoding = "utf-8". Without this argument, running adoptGenerator.py on my device is pointless as it raises UnicodeDecodeError every time. I'm not 100% sure if adding that argument will affect devices with different configurations/specs.
I don't have an access to other device apart from my own, so unfortunately I can't test to see if my proposed change can have side-effects on other OSes.
This PR attempts to fix problems with
adoptGenerator.py
, specifically, when runningmain()
imported frommakeReadme
, as follows:I've explained the path separators issue on #378. Basically, there's an unintended result when running
adoptGenerator.py
on my device and I highly suspect it's because Windows has backslash\
as path separator. I've replaced the hardcoded separator/
withos.sep
to make it work with as minimal change as possible.There are Unicode symbols present in
mathgenerator/funcs/geometry/basic_trigonometry.py
. I've changed howmakeReadme
open file by adding the argumentencoding = "utf-8"
. Without this argument, runningadoptGenerator.py
on my device is pointless as it raises UnicodeDecodeError every time. I'm not 100% sure if adding that argument will affect devices with different configurations/specs.I don't have an access to other device apart from my own, so unfortunately I can't test to see if my proposed change can have side-effects on other OSes.