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

Unability to freeze the website if no runs have calendar #10

Open
hroncok opened this issue Sep 26, 2018 · 5 comments
Open

Unability to freeze the website if no runs have calendar #10

hroncok opened this issue Sep 26, 2018 · 5 comments

Comments

@hroncok
Copy link
Member

hroncok commented Sep 26, 2018

No run with times (can happen):

Error: Nothing frozen for endpoints course_calendar_ics. Did you forget a URL generator?

No run at all (unlikely):

Error: Nothing frozen for endpoints course_calendar, course_calendar_ics. Did you forget a URL generator?

How do we get rid ourselves form this error? We can filter MissingURLGeneratorWarning, but only some.

@hroncok
Copy link
Member Author

hroncok commented Sep 26, 2018

czechitas-ostrava-jaro is still in master and has calendar. once removed, this will hit me.

hroncok referenced this issue in cvut/naucse.python.cz Sep 26, 2018
@hroncok
Copy link
Member Author

hroncok commented Sep 26, 2018

@mikicz can this be solved in NaucseFreezer? Do you have some elegant idea?

@mikicz
Copy link
Member

mikicz commented Sep 26, 2018

Well, I have a solution, IDK if it's ideal. You can override the _check_endpoints method of the Freezer class to do nothing and the problem goes away, it works even without the czechitas-ostrava-jaro run...

I also tried to use warnings.simplefilter to filter out the warning and it didn't help...

@hroncok
Copy link
Member Author

hroncok commented Sep 26, 2018

Can we copy paste it and remove specific endpoints from the check?

Maybe we can send PR to Frozen-Flask to do this in a more flexible fashion?

@mikicz
Copy link
Member

mikicz commented Sep 27, 2018

Yes, quite easily, you just need to add one line to the function...

not_generated_endpoints -= {'course_calendar_ics', 'course_calendar'}

A PR for flexible solution would of course be better.

@encukou encukou transferred this issue from pyvec/naucse.python.cz Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants