Skip to content
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

Update 404 page text #392

Closed
2 tasks done
JackMorganNZ opened this issue Oct 10, 2016 · 11 comments
Closed
2 tasks done

Update 404 page text #392

JackMorganNZ opened this issue Oct 10, 2016 · 11 comments
Labels

Comments

@JackMorganNZ
Copy link
Member

Description

The text on the 404 page is outdated and needs to be updated in a way that it won't become out of date.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the issue.

  • I have linked any relevant existing issues/suggestions in the description above (include #??? in your description to reference an issue, where ??? is the issue number)
  • I have applied relevant labels
@pvskarthikeya
Copy link
Contributor

Hey! Can I work on this?

@JackMorganNZ
Copy link
Member Author

Hi @pvskarthikeya, you are most welcome to do this. The links should probably be changed to:

  • Latest version (rather than v2.0.0)
  • And the old 1.?.? version

Feel free to ask any questions you have.

@pvskarthikeya
Copy link
Contributor

pvskarthikeya commented Oct 11, 2016

@JackMorganNZ
Hey! I am getting an error when i try to build the package.

Traceback (most recent call last):
  File "generateguide.py", line 674, in <module>
    main()
  File "generateguide.py", line 660, in main
    pdf_guide = Guide(generator_settings=generator_settings, language_code=language, version=version, output_type=PDF, html_generator=html_generator, html_templates=html_templates, regex_list=regex_list)
  File "generateguide.py", line 76, in __init__
    self.generate_pdf()
  File "generateguide.py", line 406, in generate_pdf
    from weasyprint import HTML, CSS
  File "/Users/karthikeya.pammi/.virtualenvs/cs-field-guide/lib/python3.5/site-packages/weasyprint/__init__.py", line 338, in <module>
    from .css import PARSER, preprocess_stylesheet  # noqa
  File "/Users/karthikeya.pammi/.virtualenvs/cs-field-guide/lib/python3.5/site-packages/weasyprint/css/__init__.py", line 30, in <module>
    from . import computed_values
  File "/Users/karthikeya.pammi/.virtualenvs/cs-field-guide/lib/python3.5/site-packages/weasyprint/css/computed_values.py", line 18, in <module>
    from .. import text
  File "/Users/karthikeya.pammi/.virtualenvs/cs-field-guide/lib/python3.5/site-packages/weasyprint/text.py", line 18, in <module>
    import cairocffi as cairo
  File "/Users/karthikeya.pammi/.virtualenvs/cs-field-guide/lib/python3.5/site-packages/cairocffi/__init__.py", line 46, in <module>
    cairo = dlopen(ffi, 'cairo', 'cairo-2')
  File "/Users/karthikeya.pammi/.virtualenvs/cs-field-guide/lib/python3.5/site-packages/cairocffi/__init__.py", line 43, in dlopen
    raise OSError("dlopen() failed to load a library: %s" % ' / '.join(names))
OSError: dlopen() failed to load a library: cairo / cairo-2

EDIT:
I tried to do the same thing in a python REPL: from weasyprint import HTML, CSS on line 406 is the one that is causing the issue

@JackMorganNZ
Copy link
Member Author

That's interesting, I haven't seen that before. Have you followed the installation instructions here: https://github.com/uccser/cs-field-guide/blob/develop/docs/installation.md I've realised the documentation for using PDF misses the point you will need to fully install Weasyprint, details on this here: http://weasyprint.readthedocs.io/en/latest/install.html

However this seems to be caused by creating PDF output, does it work correctly when you run the generation script normally without PDF? Don't worry about testing PDF output for this simple issue.

@pvskarthikeya
Copy link
Contributor

pvskarthikeya commented Oct 12, 2016

Hey! @JackMorganNZ I was able to build. I had to install all the dependencies locally with brew.
brew install cairo pango gdk-pixbuf libxml2 libxslt libffi and then I created a new virtualenv.
Then installed all the dependencies and after this I was able to build.

Edit: Build is complete and the log shows 4 Erros and 1583 Issues. Is this normal?
Added the log for your convenience.
log.txt

@JackMorganNZ
Copy link
Member Author

Cool! That error log is fine, the error/warning numbers are quadrupled because I presume you are creating student website, student PDF, teacher website, and teacher PDF so our current system outputs errors for each one.

The one error is a known issue that is regarding Markdown headers but it's something we are allowing until we finishing building our CSFG generation system (it's intentionally breaking it), and all the warnings are from Weasyprint generation but are fine.

So that log is normal (but we hope in the future that normal is 0 errors and 0 warnings! 😄).

@pvskarthikeya
Copy link
Contributor

@JackMorganNZ I changed the text to 2.7.1. The links for the anchor tags seems to be the correct ones. What about the 2015 Student Version? Can i change it to 1.9.9. Since, that is what the link points to. Is that okay?

Snapshot of the new 404 page:
screen shot 2016-10-12 at 12 51 41 pm

@JackMorganNZ
Copy link
Member Author

I would recommend the changing text New 2016 Student Version](#) - Version 2.7.1 to Latest Student Version as then the number won't become out of date with each update.

@JackMorganNZ
Copy link
Member Author

Also forgot to mention the second line '2015 Student Version - v1.9.9` is good as it mentions both the time of release and the version number.

@pvskarthikeya
Copy link
Contributor

@JackMorganNZ I just added a PR for this. Please have a look.

@JackMorganNZ
Copy link
Member Author

Perfect, thanks @pvskarthikeya.

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

No branches or pull requests

2 participants