Comments (3)
What platform are you seeing these partial downloads occurring on? Presumably its not macOS where we download using the external curl tool? Is it linux or windows?
Sadly the requests
library is not part of the core python library so not really possible for us to use it in this script (which is supposed to be highly portable, and kind of boostraps the whole system).
I'm curious how you think the urllib implementation could be failing? I bug in urllib itself seems highly unlikely. And the fact that nobody else has reported this issue in over a decade also seems odd. I think its worth investigating furthur.
from emsdk.
I am using Windows. Due to well-known reasons, Chinese developers often need to use proxies to accelerate access. It's not that urllib has a 'bug', but it seems less capable of handling less stable network environments. That's why I switched to the requests library, which gave me more consistent results.
As for why others haven't reported this issue, there could be various reasons. Many might simply choose to download files manually rather than addressing the root cause of the problem. Also, even when using a proxy, it doesn't necessarily mean the network is unstable - at least my friends can execute the script normally. I hope this additional context helps explain the situation.
I completely understand the importance of maintaining high portability for the script. Your point about requests
not being part of the core Python library is valid. For the sake of easy testing, I simply replaced the original implementation. However, if we were to formally integrate this into the project, we should definitely consider this point. For example, we could try the following approach:
try:
import requests
USE_REQUESTS = True
except ImportError:
USE_REQUESTS = False
This way, we maintain portability while offering a more robust solution for those who need it.
from emsdk.
I would like to understand exactly what the problem is with the urllib implementation before making any change here. Is the problem consistent for you? Perhaps we can start by adding some assertions here? Presumably we should never be returning success if not all the bytes were transferred?
from emsdk.
Related Issues (20)
- emsdk activate breaks things HOT 1
- errors while running emmake make HOT 1
- Version of `wasm_cc_binary` that doesn't untar the result? HOT 4
- set -sMAXIMUM_MEMORY = 4GB & use uuid HOT 1
- [Bazel] [Potential solution] Cannot build multiple emscripten binaries in parallel with bazel HOT 1
- [Bazel] Add example of extracting Emscripten's output with rules_foreign_cc
- emsdk install tot command fails HOT 2
- 3.1.61 Docker image not published HOT 1
- The compilation speed is too slow. HOT 1
- [Bazel] Should the toolchain set the same variables as tools/building.py? HOT 2
- TypeError: Failed to execute 'createObjectURL' on 'URL': Overload resolution failed. HOT 1
- [Bazel] Main bootstrap script for Wasm Audio Worklets not generated HOT 3
- [Bazel] feature flags for the Emscripten toolchain HOT 18
- [Bazel] Dynamically generate Emscripten cache HOT 5
- THYDU𝕏
- THYDU𝕏
- THYDU𝕏
- [bazel] [rules_foreign_cc] ModuleNotFoundError: No module named 'tools' HOT 11
- wasm_cc_binary with tensorflow lite minimal example failed HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emsdk.