Comments (6)
@chrispyles This is causing us a lot of issues, appears to stem from this change 461ec0f. Anyway to do a hotfix/5.1.4?
from otter-grader.
Relevant pr #728
from otter-grader.
I'm currently working on a fix for this but not sure how long it will take. If it's a super important issue I can put this into a bugfix release (i.e. v5.1.4) ahead of v5.2.0. As noted in my comment in #728, that PR does not actually fix the underlying issue.
from otter-grader.
@chrispyles We have around 1000 students using this and running into this issue (example error below). It still emits the ZIP file that we need, so it's not blocking, but there is confusion over it.
Running your submission against local test cases...
C:\Users\ColeNelson\anaconda3\Lib\site-packages\zmq\_future.py:679: RuntimeWarning: Proactor event loop does not implement add_reader family of methods required for zmq. Registering an additional selector thread for add_reader support via tornado. Use `asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())` to avoid this warning.
self._get_loop()
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\ColeNelson\anaconda3\Lib\site-packages\otter\check\validate_export\__main__.py", line 46, in <module>
main()
File "C:\Users\ColeNelson\anaconda3\Lib\site-packages\otter\check\validate_export\__main__.py", line 31, in main
results = grade_notebook(
^^^^^^^^^^^^^^^
File "C:\Users\ColeNelson\anaconda3\Lib\site-packages\otter\execute\__init__.py", line 103, in grade_notebook
results = pickle.load(ntf)
^^^^^^^^^^^^^^^^
EOFError: Ran out of input
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[16], line 2
1 # Save your notebook first, then run this cell to export your submission.
----> 2 grader.export(pdf=False, run_tests=True)
File ~\anaconda3\Lib\site-packages\otter\check\utils.py:166, in grading_mode_disabled(wrapped, self, args, kwargs)
164 if type(self)._grading_mode:
165 return
--> 166 return wrapped(*args, **kwargs)
File ~\anaconda3\Lib\site-packages\otter\check\utils.py:153, in incompatible_with.<locals>.incompatible(wrapped, self, args, kwargs)
151 else:
152 return
--> 153 return wrapped(*args, **kwargs)
File ~\anaconda3\Lib\site-packages\otter\check\utils.py:203, in logs_event.<locals>.event_logger(wrapped, self, args, kwargs)
201 except Exception as e:
202 self._log_event(event_type, success=False, error=e)
--> 203 raise e
205 else:
206 self._log_event(event_type, results=results, question=question, shelve_env=shelve_env)
File ~\anaconda3\Lib\site-packages\otter\check\utils.py:197, in logs_event.<locals>.event_logger(wrapped, self, args, kwargs)
194 question, results, shelve_env = wrapped(*args, **kwargs)
196 else:
--> 197 results = wrapped(*args, **kwargs)
198 shelve_env = {}
199 question = None
File ~\anaconda3\Lib\site-packages\otter\check\notebook.py:447, in Notebook.export(self, nb_path, export_path, pdf, filtering, pagebreaks, files, display_link, force_save, run_tests)
444 display(HTML(out_html))
446 if pdf_created or not otter_nb_config.get(REQUIRE_CONFIRMATION_NO_PDF_EXPORT_KEY, False):
--> 447 continue_export()
448 else:
449 display_pdf_confirmation_widget(
450 otter_nb_config.get(NO_PDF_EXPORT_MESSAGE_KEY), continue_export)
File ~\anaconda3\Lib\site-packages\otter\check\notebook.py:429, in Notebook.export.<locals>.continue_export()
427 if run_tests:
428 print("Running your submission against local test cases...\n")
--> 429 results = grade_zip_file(zip_path, nb_path, self._path)
430 print(
431 "Your submission received the following results when run against " + \
432 "available test cases:\n\n" + indent(results.summary(), " "))
434 if display_link:
435 # create and display output HTML
File ~\anaconda3\Lib\site-packages\otter\check\utils.py:91, in grade_zip_file(zip_path, nb_arcname, tests_dir)
88 print(results.stderr.decode("utf-8"))
90 if results.stderr:
---> 91 raise RuntimeError(results.stderr)
93 with open(results_path, "rb") as f:
94 results = dill.load(f)
RuntimeError: b'C:\\Users\\ColeNelson\\anaconda3\\Lib\\site-packages\\zmq\\_future.py:679: RuntimeWarning: Proactor event loop does not implement add_reader family of methods required for zmq. Registering an additional selector thread for add_reader support via tornado. Use `asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())` to avoid this warning.\r\n self._get_loop()\r\nTraceback (most recent call last):\r\n File "<frozen runpy>", line 198, in _run_module_as_main\r\n File "<frozen runpy>", line 88, in _run_code\r\n File "C:\\Users\\ColeNelson\\anaconda3\\Lib\\site-packages\\otter\\check\\validate_export\\__main__.py", line 46, in <module>\r\n main()\r\n File "C:\\Users\\ColeNelson\\anaconda3\\Lib\\site-packages\\otter\\check\\validate_export\\__main__.py", line 31, in main\r\n results = grade_notebook(\r\n ^^^^^^^^^^^^^^^\r\n File "C:\\Users\\ColeNelson\\anaconda3\\Lib\\site-packages\\otter\\execute\\__init__.py", line 103, in grade_notebook\r\n results = pickle.load(ntf)\r\n ^^^^^^^^^^^^^^^^\r\nEOFError: Ran out of input\r\n'
from otter-grader.
@ctnelson1997 I'm not sure how much a fix for this will help for your issue. The fix I'm proposing here doesn't fix the fact that an EOFError
occurs, it just handles it more gracefully.
I'm not sure why the error you provided is getting thrown -- it looks like something unrelated to this issue and would require more debugging. If you just want to silence the error, you could disable the submission zip validation in grader.export
by setting export_cell: run_tests: false
in your assignment config (or by manually removing run_tests=True
from the grader.export
call).
from otter-grader.
Hi @chrispyles this appears to be a platform compatibility issue with the use of NamedTemporaryFile. For anyone not on a Unix machine (e.g. Windows, like mine) the NamedTemporaryFile cannot be opened again. Thus, results cannot be written, which I believe is what's causing the file to be empty, leading to the EOFError: Ran out of input
from otter-grader.
Related Issues (20)
- Inserting blank line at the end of a solution cell gives odd behavior HOT 1
- Submission link errors HOT 1
- Clearer error message when notebook does not contain expected metadata HOT 4
- mention gradescope in the username/password prompt of otter assign HOT 2
- Autograder fails on Gradescope for R .ipynb files HOT 4
- Issues with loading packages via the tidyverse metapackage HOT 4
- CLI documenation: otter grader 4.4.1 versus 5 HOT 1
- "Include" tag for markdown cells in question solution block HOT 1
- Error on grader.export for Windows Machines HOT 1
- `nbconvert` missing in JupyterLite
- Student-created .py files HOT 2
- Patch : 4.4.1: Sort final_grades.csv HOT 1
- Create more minimal examles of environment.yml files HOT 2
- `no attribute 'from_string'` in JupyterLite HOT 1
- An error in executing `grader.check_all()` HOT 2
- Make the new `r-ottr` conda package compatible with R 4.1.* HOT 8
- Show executed code for JN during autograding HOT 5
- Fix all_or_nothing and add better support
- Exercise file quantifierRaising_vs_typeshifting.txt doesn't open in 2.6.0 SE + TE on Mac HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from otter-grader.