fastai / fastpages

An easy to use blogging platform, with enhanced support for Jupyter Notebooks.
https://fastpages.fast.ai/
Apache License 2.0
3.53k stars 758 forks source link

Auto upgrade fails #634

Closed castorfou closed 2 years ago

castorfou commented 2 years ago

Required Prerequisites for filing a bug

You must follow ALL the steps in the troubleshooting guide. Not doing so may result in automatic closure of the issue.

Required information

  1. Steps to reproduce the problem

Create an issue of type [fastpages] Automated Upgrade Open the action

Wait for a new comment in this issue by github-actions:

An error occurred when attempting to open a PR to update fastpages. See the Actions tab of your repo for more details.

  1. A link to the notebook or markdown file where the error is occurring
  2. If the error is happening in GitHub Actions, a link to the specific error along with how you are able to reproduce this error. You must provide this in addition to the link to the notebook or markdown file.

The action [fastpages] Automated Upgrade fails in the upgrade job. More specifically it fails at the sync baseurl step.

Run import re, os, yaml Traceback (most recent call last): File "/home/runner/work/_temp/514acf91-3852-4d68-a20e-62f3ad147b7d.py", line 22, in config = yaml.load(cfg) TypeError: load() missing 1 required positional argument: 'Loader' Error: Process completed with exit code 1.

  1. A screenshot / dump of relevant logs or error messages you are receiving from your local development environment. Instructions of running a local development server is provided in the development guide.

image

github-actions[bot] commented 2 years ago

Thank you for opening an issue. If this issue is related to a bug, please follow the steps and provide the information outlined in the Troubleshooting Guide. Failure to follow these instructions may result in automatic closing of this issue.

castorfou commented 2 years ago

I think this is due to PyYAML yaml.load(input) Deprecation. As explained in https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation,

Use of PyYAML's yaml.load function without specifying the Loader=... parameter, has been deprecated. In PyYAML version 5.1+, you will get a warning, but the function will still work. See How to Disable the Warning below.

I guess now it is not a warning message, but an error message.

Not sure how to fix it, maybe force a previous yaml version?

hamelsmu commented 2 years ago

@castorfou Yes I had to pin this version of pyaml which I fixed. Is there any chance you can start a new repo and copy all your files over? I've made some additional changes based on GitHub Actions that won't allow you to upgrade without copying everything over.

I'll close this issue for now but please feel free to keep the conversation going.

castorfou commented 2 years ago

Thank you @hamelsmu I have just created a new repo and copied everything. It works but .. is there a way to keep the former baseurl? I tried by modifying _config.yml and _action_files\settings.ini without any success.

castorfou commented 2 years ago

I have detailed what I did at https://castorfou.github.io/blog/blog/upgrade-fastpages.html

hamelsmu commented 2 years ago

@castorfou can your new repo so its the same as the old repo? That should help. You may have to rename the old repo first

castorfou commented 2 years ago

@hamelsmu so simple ;) will do that