ProjectPythia / cookbook-gallery

Root site for the ProjectPythiaCookbooks GitHub Pages
https://cookbooks.projectpythia.org
MIT License
0 stars 13 forks source link

Attribute error in gallery action #167

Closed jukent closed 11 months ago

jukent commented 11 months ago

Action is failing with an attribute error - see https://github.com/ProjectPythia/cookbook-gallery/issues/165

Run python .github/workflows/collect-user-submission.py
Traceback (most recent call last):
  File ".github/workflows/collect-user-submission.py", line 38, in <module>
    issue = IssueInfo(gh_event_path=os.environ["GITHUB_EVENT_PATH"]).create_submission()
  File ".github/workflows/collect-user-submission.py", line 23, in create_submission
    self._create_submission_input()
  File ".github/workflows/collect-user-submission.py", line 27, in _create_submission_input
    text = self.data["issue"]["body"]
AttributeError: 'IssueInfo' object has no attribute 'data'
Error: Process completed with exit code 1.

This is an attempt to update the .py script to fix this. Related to #158

github-actions[bot] commented 11 months ago

👋 Thanks for opening this PR! The Cookbook will be automatically built with GitHub Actions. To see the status of your deployment, click below. 🔍 Git commit SHA: ea1053a401d91f7e9e63e4d02ed809e4a5ca7eb2 ✅ Deployment Preview URL: https://ProjectPythia.github.io/cookbook-gallery/_preview/167

brian-rose commented 11 months ago

I don't understand it much either, but since it's already broken, I don't see a good reason not to ahead and merge for further testing @jukent

jukent commented 11 months ago

Thank you. I'm not 100% confident but it it is a possible workaround if self.data doesn't exist. Let's merge and see.