Skip to content

fix: handle dobject import error with helpful error message #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Paroksh1
Copy link

@Paroksh1 Paroksh1 commented Apr 19, 2025

Summary

This PR resolves the dobject import error by bundling the dobject module directly into the activity folder. This ensures the activity works properly even in .xo installs that lack Git history or submodules.

Changes Made

  • Removed Git submodule setup for dobject
  • Moved all dobject code to arithmetic/dobject/
  • Removed .gitmodules and cleaned up .git/config
  • Updated arithmetic.py to use Python 3 syntax and direct imports
  • Removed deprecated cgitb usage
  • Confirmed structure works via Python 3 validation

Why This Fix Is Needed

Sugar users typically install .xo bundles, not via Git. This bundling ensures compatibility across installs. Fix also aligns with maintainer feedback to remove the submodule dependency.

Closes #

@chimosky
Copy link
Member

chimosky commented Apr 19, 2025

Activity bundles are usually distributed without their git history, so using git wouldn't work.

Plus you're also believing that whoever uses the activity and gets that error would check the logs to see why, that's rarely the case.

The submodule also seems to be nonexistent, so I would suggest finding the right submodule and updating it, then testing to see if that fixes the issue.

@Paroksh1
Copy link
Author

Hi @chimosky
I've updated the PR by fully removing the dobject submodule and bundling the required code directly into the activity. Python 3 compatibility is ensured, and the activity is now submodule-independent — works for .xo users too. Let me know if anything more is needed. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants