Open erblum opened 2 weeks ago
Hi,
Thanks for getting in touch. What python version did you use to bundle the aga script and what python version did you use in gradescope?
It looks like pip
may have updated their syntax for dependency management. It's not clear to me how to fix it at this moment but I'd love to help if you can provide me more information (such as Python version and the bundled autograder scripts).
I generated the .zip on my laptop, which has Python 3.11.5. (I know different Python versions on the same machine sometimes cause sneaky problems, so if there is a way to see/control which Python version is being used to generate, let me know and I'll try to find out for you.)
Looking at the build output, I see a line that says Setting up python3.11 (3.11.8-1+jammy2) ...
so it looks like 3.11.8 is being used there.
Here is the bundled script (created by running aga gen --inject injection.py 2_collatz_length.py
):
collatz_length.zip
And a zip containing just the plain source files: src files.zip
Hi, Larry! I faced this problem too. I think I had hoped to work around this by explicitly installing the needed Python packages in setup.sh
with the lines below, and then maybe eliminating the install_requires
. But it has been a week or so and can't remember if that was a working workaround.
python3.10 -m pip install dataclasses-json
python3.10 -m pip install dill
python3.10 -m pip install gradescope-utils
python3.10 -m pip install typer
python3.10 -m pip install dacite
python3.10 -m pip install toml
python3.10 -m pip install types-toml
A workaround can be removing the ^
in the install_requires
in the generated setup.py
. I can push an update a bit later.
Alright, the fix has been pushed. I cannot release the package to PyPI because there is some issue with Riley's account (her primary email is not verified). Until then, you can clone the repo and install locally. @jimfix @erblum
I took the idea of aga and built a new version here. The syntax is similar and you should be able to get started pretty quickly with the existing scripts.
Thanks so much, Larry! This is a huge help.
(Hi folks! I am the furthest thing from a developer so please excuse any accidental breaches of open source norms/etiquette.)
Summary
I have an older script from spring 2023 that worked at the time, but is now hitting an error when I try to rebuild on Gradescope. My best guess is that the dependency specifiers for
types-toml
,dacite
, andtoml
need to be updated to conform to a newer specification. (More details below!)Caveat: there is a non-zero chance that this is user error and the real problem is that I'm using an old version of
aga
. I noticed that the build output mentionsaga 0.10.0
, despite my best efforts to update to the latest version. Sorry in advance if that turns out to be the issue!Details
Here is [what I think is] the relevant part of the build output from Gradescope for the broken problem (full output pasted in broken_output.txt, attached):
The build error itself reads:
The command '/bin/sh -c bash /gradescope/setup.sh' returned a non-zero code: 1
I went back to look at an untouched Gradescope problem (last built March 18 2024) to compare and noticed some deprecation warnings. Here is an excerpt from the build output from the untouched problem, starting at the same spot as the excerpt above from the broken problem. (Full output in working_output.txt)
Let me know if there's any other info that would be helpful for reproducing/debugging.
Attachments
broken_output.txt working_output.txt