Skip to content

Error Handling for Window10 without CygWin #117

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

Merged
merged 1 commit into from
Jan 5, 2017
Merged

Error Handling for Window10 without CygWin #117

merged 1 commit into from
Jan 5, 2017

Conversation

tobozo
Copy link
Contributor

@tobozo tobozo commented Jan 5, 2017

Added an Exception handling to the offending urlretrieve() call for the issue #108

It's not really a fix but the failure message is much more elegant than the initial stack trace as it hints at the solution to the setup problem rather than confusing the user into Windows problems.

Added an Exception handling to the offending urlretrieve() call for the issue #108 #108

It's not really a fix but the failure message is much more elegant than the initial stack trace as it hints at the solution to the setup problem rather than confusing the user into Windows problems.
@me-no-dev
Copy link
Member

Nice! Thanks, though finding what is causing this is much preferred :) I have not been able to reproduce it here.

@me-no-dev me-no-dev merged commit b5858c1 into espressif:master Jan 5, 2017
@tobozo
Copy link
Contributor Author

tobozo commented Jan 6, 2017

After some investigation the problem seems to be in urllib

  • python 2.7x
  • win10
  • no CYGWIN_NT in PATH/ENV (using git shell from Git For Windows)

Workaround:

  • #> pip install requests

  • add "import requests" in get.py

  • use the following code when urlretrieve raises an exception :

            r = requests.get(url)
            f = open(local_path, 'wb')
            f.write(r.content)
            f.close()
    

I can submit a PR if this approach is verified to work on another machine

everslick referenced this pull request in everslick/Arduino-ESP32-1.0.0 Jul 16, 2018
brentru pushed a commit to adafruit/arduino-esp32 that referenced this pull request Oct 22, 2024
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

Successfully merging this pull request may close these issues.

2 participants