Git Product home page Git Product logo

Comments (6)

asvattha avatar asvattha commented on August 11, 2024

I am also having the same error. Did you find any workaround for this? It's common for students to forget to delete the .ipynb_checkpoints before submitting.

from ngshare.

JBRhoads avatar JBRhoads commented on August 11, 2024

Yes, here's the workaround I'm using. First, find where your ngshare.db is. Also, you have to install sqlite3.

  1. To view the submissions which contain .ipynb_checkpoints files:
    sqlite3 ngshare.db 'select * from submission_files_assoc_table join files on files._id=submission_files_assoc_table.right_id where files.filename like "%.ipynb_checkpoints%";' '.exit'

  2. I suggest backing up your ngshare.db file, just in case.

  3. Then to delete the associations:
    sqlite3 ngshare.db 'delete from submission_files_assoc_table where ROWID IN (select submission_files_assoc_table.ROWID from submission_files_assoc_table join files on files._id=submission_files_assoc_table.right_id where files.filename like "%.ipynb_checkpoints%");' '.exit'

  4. Run the first command again to see that the files are now unassociated.

To make this easier for me, I'm just running the delete command every night via a CronJob deployment in k8s.

from ngshare.

asvattha avatar asvattha commented on August 11, 2024

@JBRhoads

  1. How to find the ngshare.db? is it same as the gradebook.db of nbgrader?
  2. To install sqlite3; you mean to install it inside the pod (container) or on k8s?
  3. Your code in Step 1 and Step 3 commands are exactly same, how the latter is deleting the associations?

from ngshare.

JBRhoads avatar JBRhoads commented on August 11, 2024

Oops, I fixed step 3.

No, ngshare.db will be in the ngshare server pod. Yeah, you can install sqlite3 there (I haven't tried this) or you can on whichever system that can also access that same persistent volume that's being used by ngshare.

from ngshare.

asvattha avatar asvattha commented on August 11, 2024

@JBRhoads
Thank you very much for such a quick response. It's working as per your suggestion. :)

from ngshare.

mike-pisman avatar mike-pisman commented on August 11, 2024

Yes, here's the workaround I'm using. First, find where your ngshare.db is. Also, you have to install sqlite3.

1. To view the submissions which contain .ipynb_checkpoints files:
   `sqlite3 ngshare.db 'select * from submission_files_assoc_table join files on files._id=submission_files_assoc_table.right_id where files.filename like "%.ipynb_checkpoints%";' '.exit'`

2. I suggest backing up your ngshare.db file, just in case.

3. Then to delete the associations:
   `sqlite3 ngshare.db 'delete from submission_files_assoc_table where ROWID IN (select submission_files_assoc_table.ROWID from submission_files_assoc_table join files on files._id=submission_files_assoc_table.right_id where files.filename like "%.ipynb_checkpoints%");' '.exit'`

4. Run the first command again to see that the files are now unassociated.

To make this easier for me, I'm just running the delete command every night via a CronJob deployment in k8s.

Thank you sharing, this worked. Can you please also share the manifest for the cron job?

from ngshare.

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.