malariagen / ag1000g-phase3-data-paper

Other
1 stars 2 forks source link

Error during Build Manuscript step in Manubot workflow, running filter pandoc-manubot-cite #53

Open leehart opened 3 years ago

leehart commented 3 years ago

https://github.com/malariagen/ag1000g-phase3-data-paper/pull/49/checks?check_run_id=1385871856 https://github.com/malariagen/ag1000g-phase3-data-paper/pull/51/checks?check_run_id=1381519389

[INFO] Running filter pandoc-manubot-cite
Traceback (most recent call last):
  File "/usr/share/miniconda3/envs/manubot/bin/pandoc-manubot-cite", line 8, in <module>
    sys.exit(main())
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/manubot/pandoc/cite_filter.py", line 214, in main
    doc = pf.load(input_stream=args.input)
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/panflute/io.py", line 58, in load
    doc = json.load(input_stream, object_hook=from_json)
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/json/__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/json/__init__.py", line 361, in loads
    return cls(**kw).decode(s)
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/panflute/elements.py", line 1353, in from_json
    return Doc(*items, api_version=api, metadata=meta)
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/panflute/elements.py", line 66, in __init__
    raise TypeError("invalid api version", api_version)
TypeError: ('invalid api version', [1, 20])
Error running filter pandoc-manubot-cite:
Filter returned error status 1
Error: Process completed with exit code 83.
leehart commented 3 years ago

It looks like pandoc-manubot-cite is somehow trying to use an invalid API version of panflute.elements?

        # Handle Pandoc Legacy
        if api_version is None:
            self.api_version = None  # Pandoc Legacy
        elif len(api_version) > 4:
            raise TypeError("invalid api version", api_version)
        elif tuple(api_version) <= (1, 17, 0):
            raise TypeError("invalid api version", api_version)
        else:
            self.api_version = tuple(check_type(v, int) for v in api_version)

I wonder if updating these PRs with the latest master will resolve this problem, since we've upgraded Manubot? E.g. something like

git checkout master
git pull
git checkout q96-introgression
git merge master
git push
leehart commented 3 years ago

https://github.com/manubot/rootstock/issues/390

agitter commented 3 years ago

I wonder if updating these PRs with the latest master will resolve this problem, since we've upgraded Manubot?

Now that you updated Manubot on master, I believe you may even be able to re-build those pull requests without any additional modifications. If I recall correctly, GitHub Actions will run on a new merge commit that merges your pull request branch into master.

leehart commented 3 years ago

Thanks @agitter . I tried that (again) but unfortunately it didn't seem to work for some reason (same error).

agitter commented 3 years ago

You're right, sorry about that. I see the merge commit GitHub Actions generates is still based on 3fd5aa3a84876cf10788e0a5a40703253c5784af from master https://github.com/malariagen/ag1000g-phase3-data-paper/pull/49/checks?check_run_id=1392781099#step:3:348

In that case, the git sequence you listed above looks like a good solution.