Giter Club home page Giter Club logo

Comments (16)

chrispyles avatar chrispyles commented on September 27, 2024 1

I've opened ucbds-infra/ottr#21 to continue exporting the submission zip if a PDF can't be generated, which should be the only change required on otter's end for this issue. It will be included in v1.5.0 of ottr, which will come out once I've fixed #767 as well.

from otter-grader.

dbroockman avatar dbroockman commented on September 27, 2024

Looks like it's not just a PDF issue, I get part of the error on Berkeley R Datahub when setting pdf = FALSE too:
Screenshot 2024-01-21 at 9 06 21 PM

from otter-grader.

dbroockman avatar dbroockman commented on September 27, 2024

And actually, I even get an error without the force_save = TRUE flag.
Screenshot 2024-01-21 at 9 31 02 PM

from otter-grader.

dbroockman avatar dbroockman commented on September 27, 2024

Upon further investigation, it's possible at least some of this might be tied to generic Berkeley datahub issues. https://ds-modules.slack.com/archives/C3ESHBX2N/p1705901646319269

from otter-grader.

chrispyles avatar chrispyles commented on September 27, 2024

Looks like it's not just a PDF issue, I get part of the error on Berkeley R Datahub when setting pdf = FALSE too: Screenshot 2024-01-21 at 9 06 21 PM

The warning you're seeing is a separate issue -- I'm not sure why force save isn't working. But from the line below the warning, you can see that the zip file was generated, so the bug in this issue is only occurring when pdf = TRUE.

from otter-grader.

dbroockman avatar dbroockman commented on September 27, 2024

Thanks. With the Datahub issues resolved, looks like the issue persists with force save set to TRUE but the function works without either the force save or PDF flags.

from otter-grader.

chrispyles avatar chrispyles commented on September 27, 2024

Sorry, I'm confused now. Can you send a screenshot of running with both pdf and force_save set to true now that the hub issues are resolved?

from otter-grader.

dbroockman avatar dbroockman commented on September 27, 2024

Summary:

  • ottr::export("Week2_Activity1.ipynb") works
  • ottr::export("Week2_Activity1.ipynb", force_save = TRUE) error:
Screenshot 2024-01-22 at 9 17 40 AM - `ottr::export("Week2_Activity1.ipynb", pdf = TRUE)` error: Screenshot 2024-01-22 at 9 18 08 AM

from otter-grader.

chrispyles avatar chrispyles commented on September 27, 2024

What you're seeing in ottr::export("Week2_Activity1.ipynb", force_save = TRUE) isn't an error but a warning; the zip is still being generated. Not sure why force save isn't working but I'll open a separate issue for that.

For ottr::export("Week2_Activity1.ipynb", pdf = TRUE), can you open a terminal on the hub, cd into the directory with the notebook, and run jupyter nbconvert --to=pdf Week2_Activity1.ipynb and send the output?

from otter-grader.

chrispyles avatar chrispyles commented on September 27, 2024

For ottr::export("Week2_Activity1.ipynb", pdf = TRUE), can you open a terminal on the hub, cd into the directory with the notebook, and run jupyter nbconvert --to=pdf Week2_Activity1.ipynb and send the output?

@dbroockman, any update on this?

from otter-grader.

dbroockman avatar dbroockman commented on September 27, 2024
Traceback (most recent call last):
  File "/srv/conda/bin/jupyter-nbconvert", line 6, in <module>
    from nbconvert.nbconvertapp import main
  File "/srv/conda/lib/python3.9/site-packages/nbconvert/nbconvertapp.py", line 193, in <module>
    class NbConvertApp(JupyterApp):
  File "/srv/conda/lib/python3.9/site-packages/nbconvert/nbconvertapp.py", line 252, in NbConvertApp
    Options include {get_export_names()}.
  File "/srv/conda/lib/python3.9/site-packages/nbconvert/exporters/base.py", line 145, in get_export_names
    e = get_exporter(exporter_name)(config=config)
  File "/srv/conda/lib/python3.9/site-packages/nbconvert/exporters/base.py", line 106, in get_exporter
    exporter = items[0].load()
  File "/srv/conda/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 184, in load
    module = import_module(match.group('module'))
  File "/srv/conda/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/srv/conda/lib/python3.9/site-packages/jupyter_contrib_nbextensions/__init__.py", line 5, in <module>
    import jupyter_nbextensions_configurator
  File "/srv/conda/lib/python3.9/site-packages/jupyter_nbextensions_configurator/__init__.py", line 18, in <module>
    from notebook.base.handlers import APIHandler, IPythonHandler
ModuleNotFoundError: No module named 'notebook.base'

from otter-grader.

chrispyles avatar chrispyles commented on September 27, 2024

Looks like the hub has some incompatible package versions; I'm guessing it's an outdated version of jupyter_nbextensions_configurator. I'd open an issue on the datahub repo that this is preventing nbconvert from being able to export notebooks as PDFs.

From this it looks like notebook v7 (which is what the hub is using) isn't compatible with notebook extensions? I'm not 100% sure.

from otter-grader.

dbroockman avatar dbroockman commented on September 27, 2024

Thank you, bug opened here: datahub-project/datahub#9732

from otter-grader.

chrispyles avatar chrispyles commented on September 27, 2024

I think that's the wrong repo. Berkeley datahub (afaik) is run from https://github.com/berkeley-dsep-infra/datahub

from otter-grader.

dbroockman avatar dbroockman commented on September 27, 2024

Thanks for the flag.

from otter-grader.

shaneknapp avatar shaneknapp commented on September 27, 2024

Looks like the hub has some incompatible package versions; I'm guessing it's an outdated version of jupyter_nbextensions_configurator. I'd open an issue on the datahub repo that this is preventing nbconvert from being able to export notebooks as PDFs.

From this it looks like notebook v7 (which is what the hub is using) isn't compatible with notebook extensions? I'm not 100% sure.

yep, this is 100% the case: notebook v7 isn't compatible with notebook v6 extensions.

from otter-grader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.