You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've done the "own_language" exercise in part 7 -> 6. More Python features . It runs correctly on every test except the exercise called "OwnLanguageTest: test3_all_commands". It says that my program causes on error. I copy the code and try it in an if __name == "main" block and I do not get an error (In some tests (but not in this failed test) my program was throwing maxRecursionError, so when I imported the 'setrecursionlimit' function in 'sys' and called the function with the argument 100000 the problem was solved).
But then I looked at the file 'test_own_language.py' in ...AppData\Local\tmc\vscode\mooc-programming-24*part07-18_own_programming_language\test* I found most of the problem, the file does 'from tmc import points' but for some reason the file can't access or find the init.py in the 'tmc' folder.
The init.py file contains:
from .points import points
from .runner import TMCTestRunner
But when run, it throws this error (even if I comment the first line): ImportError: attempted relative import with no known parent package
And yes, I don't know why this is happening. And my solution to the exercise works fine. When I set the max recursion limit to 100000, almost all tasks run perfectly. But the TestMyCode extension says it fails.
Please help me. I don't know if it's something related to me or to the extension.
And I couldn't find any other solution to this problem on the Internet.
Thanks.
The text was updated successfully, but these errors were encountered:
I've done the "own_language" exercise in part 7 -> 6. More Python features . It runs correctly on every test except the exercise called "OwnLanguageTest: test3_all_commands". It says that my program causes on error. I copy the code and try it in an if __name == "main" block and I do not get an error (In some tests (but not in this failed test) my program was throwing maxRecursionError, so when I imported the 'setrecursionlimit' function in 'sys' and called the function with the argument 100000 the problem was solved).
But then I looked at the file 'test_own_language.py' in ...AppData\Local\tmc\vscode\mooc-programming-24*part07-18_own_programming_language\test* I found most of the problem, the file does 'from tmc import points' but for some reason the file can't access or find the init.py in the 'tmc' folder.
The init.py file contains:
But when run, it throws this error (even if I comment the first line): ImportError: attempted relative import with no known parent package
And yes, I don't know why this is happening. And my solution to the exercise works fine. When I set the max recursion limit to 100000, almost all tasks run perfectly. But the TestMyCode extension says it fails.
Please help me. I don't know if it's something related to me or to the extension.
And I couldn't find any other solution to this problem on the Internet.
Thanks.
The text was updated successfully, but these errors were encountered: