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

asyncio Event loop policy, UnicodeEncodeError and planners' exception handling (fixes #3) #6

Merged
merged 6 commits into from
Aug 27, 2020

Conversation

Voyz
Copy link
Owner

@Voyz Voyz commented Aug 25, 2020

fixes #3


Fixes or warns against two errors that can occur on Windows :

  • UnicodeEncodeError - if default stdin/stdout encoding is unusual (for instance windows-1252)
  • Asyncio/Event loop is closed - if run on Python 3.8+

Also fixes exception handling of unusual exceptions on both APSPlanner and SchedulePlanner.

@pybokeh if you like give this a quick look through - this fixes the issue #3 we've been discussing over the last week.

(This PR additionally contains small tweaks that were found in #3 and a unit test for config.py)

@Voyz Voyz added the bug Something isn't working label Aug 25, 2020
@pybokeh
Copy link

pybokeh commented Aug 26, 2020

I'm no expert, but these fixes look good to me. I see that you did look into that syntax warning that I was seeing intermittently.
Hopefully, only a few other Windows users will have unusual setups like mine ;-)

I'm sure you'll be able to attract more experienced contributors to this project and I will definitely advertise! Since this project has extensibility designed in, I hope to see more outlets made. I look forward to someone creating a PostgreSQL outlet some day. It is very refreshing to see a Python library with a producer-consumer paradigm that also works on Windows.

Thank you for your kind and quick responses!

@Voyz
Copy link
Owner Author

Voyz commented Aug 27, 2020

Great, thanks for the review @pybokeh! Indeed, got that print syntax issue fixed. I'd love to indeed see what you describe - a library of various inlets and outlets being shared amongst the community. I went ahead with some functionalities I felt comfortable with, although by no means could I implement all the common use cases, so hoping that some developers will pick up the ball and help me keep it rolling. PostgreSQL for instance I wouldn't be competent enough with implementing. Will ping you if someone does one day though!

Going ahead with a merge for this PR and will follow with a new release soon after.

Thanks for collaborating and hope to speak to you again sometime :)
Voy

@Voyz Voyz self-assigned this Aug 27, 2020
@Voyz Voyz merged commit ac3ac1f into master Aug 27, 2020
@Voyz Voyz deleted the fix/asyncio-loop-and-unicode-encode branch August 27, 2020 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows 10 - RuntimeError: Event loop is closed and UnicodeEncodeError: 'charmap' codec can't encode character
2 participants