-
Notifications
You must be signed in to change notification settings - Fork 36
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
Crash in mkpdfs #1
Comments
Hello @TimW55, I have an Idea about what's the problem. This seems to be a bug in the current version. I'll do my best to work on it asap. Thanks, |
@TimW55, I've found out where was the bug coming from. I'm working on a release for next week. The problem was located to the fact that I was assuming any theme has integrated I hope this will be an acceptable solution. If you do have another Idea just let me know. |
- Documentation has been updated - The version has been updated in the setup
Gerry,
Thanks very much for looking into this.
I am using the readthedocs theme.
Attached is a short md file and an mkdocs.yml file which illustrate the problem.
I think in my case your proposed solution should work but have no idea how generally applicable it will be.
Thanks again for sorting this out.
[index.md.txt](https://github.com/comwes/mkpdfs-mkdocs-plugin/files/3313882/index.md.txt)
[mkdocs.yml.txt](https://github.com/comwes/mkpdfs-mkdocs-plugin/files/3313885/mkdocs.yml.txt)
Tim
|
Hello Tim, |
Gerry,
Thanks a lot. I have just tested version 1.0.1 and it is now working.
Regards
Tim
From: Gerry Ntabuhashe <notifications@github.com>
Sent: 23 June 2019 21:12
To: comwes/mkpdfs-mkdocs-plugin <mkpdfs-mkdocs-plugin@noreply.github.com>
Cc: TimW55 <t.willans@ntlworld.com>; Mention <mention@noreply.github.com>
Subject: Re: [comwes/mkpdfs-mkdocs-plugin] Crash in mkpdfs (#1)
Hello Tim,
This will definitely fix your issue.
Enjoy!
Gerry N.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1?email_source=notifications&email_token=AFOVWKLFQSIVA62Q3F5YSUTP37KKXA5CNFSM4HYPSAF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYLGB6I#issuecomment-504783097> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AFOVWKOL5RKADZ4S5QPG4P3P37KKXANCNFSM4HYPSAFQ> . <https://github.com/notifications/beacon/AFOVWKLWLBSBDYTVGMDY2DDP37KKXA5CNFSM4HYPSAF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYLGB6I.gif>
|
I am experiencing a crash in mkpdfs and hope that you can tell me what I am doing wrong.
My environment is:
O/S: Ubuntu 18.04
mkdocs: 1.0.4
mkpdfs-mkdocs: 1.0.0
weasyprint: 47
beautiful soup: 4.7.1
traceback:
File "/home/tjw/.local/lib/python3.6/site-packages/mkdocs/plugins.py", line 94, in run_event
result = method(item, **kwargs)
File "/home/tjw/.local/lib/python3.6/site-packages/mkpdfs_mkdocs/mkpdfs.py", line 58, in on_post_page
pdf_url = self.generator.add_article(output_content, page, base_url)
File "/home/tjw/.local/lib/python3.6/site-packages/mkpdfs_mkdocs/generator.py", line 64, in add_article
article = prep_combined(article, base_url, page.file.url)
File "/home/tjw/.local/lib/python3.6/site-packages/mkpdfs_mkdocs/preprocessor/prep.py", line 9, in get_combined
for id in soup.find_all(id=True):
AttributeError: 'NoneType' object has no attribute 'find_all'
It seems that in Generator.add_article
article = soup.find('article')
is setting article to None. I have attached a file showing the contents of soup.soup_contents.txt
mkdocs itself is working well.
Thanks for your help.
Tim
The text was updated successfully, but these errors were encountered: