Comments (6)
from futurelearn-dl.
Thanks for your response. Unfortunately, it doesn't work. HOME was already set. It seems that something else is going wrong, unfortunately. Perhaps something specific to Windows?
(perhaps: windows uses backslashes, so perhaps the current code adds forward slashes into the path?)
from futurelearn-dl.
from futurelearn-dl.
Thanks, progress! This works, but some other error messages are now evoked. Let me copy the output here, can you see if I should make any further alterations to the code?
Overall, the html file and the (only few) videos are downloaded, so most (if not all) is there.
[C:\Python35\Scripts]futurelearn-dl.py myUN myPW big-data-visualisation 2
Downloading 2-week course 'big-data-visualisation'
ERROR: UnicodeEncodeError - 'charmap' codec can't encode character '\u2003' in position 30609: character maps to
ERROR: UnicodeEncodeError - 'charmap' codec can't encode character '\u2003' in position 30609: character maps to
Downloading urlhttps://view.vzaar.com/7051757/video
to file <big-data-visualisation/week1/1.1-Welcome-to-the-course_7051757.mp4> ...
type=mp4, content.len=8898117
ERROR: UnicodeEncodeError - 'charmap' codec can't encode characters in position 27757-27758: character maps to
ERROR: UnicodeEncodeError - 'charmap' codec can't encode characters in position 27757-27758: character maps to
Downloading urlhttp://squidspot.com/Periodic_Table_of_Typefaces.html
to file <big-data-visualisation/week1/1.12-Choosing-the-right-form-of-visualisation_Periodic_Table_of_Typefaces.html> ...
type=html, content.len=19614
Downloading urlhttps://view.vzaar.com/7051801/video
to file <big-data-visualisation/week1/1.16-Interactive-art_7051801.mp4> ...
type=mp4, content.len=11625800
ERROR: UnicodeEncodeError - 'charmap' codec can't encode character '\u2003' in position 25988: character maps to
ERROR: UnicodeEncodeError - 'charmap' codec can't encode character '\u2003' in position 25988: character maps to
ERROR: UnicodeEncodeError - 'charmap' codec can't encode character '\u2211' in position 23368: character maps to
ERROR: UnicodeEncodeError - 'charmap' codec can't encode character '\u2211' in position 23368: character maps to
ERROR: UnicodeEncodeError - 'charmap' codec can't encode characters in position 30036-30037: character maps to
ERROR: UnicodeEncodeError - 'charmap' codec can't encode characters in position 30036-30037: character maps to
Downloading urlhttps://view.vzaar.com/7087555/video
to file <big-data-visualisation/week2/2.2-The-visualisation-process_7087555.mp4> ...
type=mp4, content.len=7176196
Downloading urlhttp://www.htmlwidgets.org/showcase_plotly.html
to file <big-data-visualisation/week2/2.7-Getting-started-with-MATLAB_showcase_plotly.html> ...
type=html, content.len=60943
ERROR: UnicodeEncodeError - 'charmap' codec can't encode characters in position 25825-25826: character maps to
ERROR: UnicodeEncodeError - 'charmap' codec can't encode characters in position 25825-25826: character maps to
Downloading urlhttp://www.htmlwidgets.org/showcase_plotly.html
to file <big-data-visualisation/week2/2.17-Putting-it-all-together_showcase_plotly.html> ...
type=html, content.len=60943
Downloading urlhttp://localhost:8080/australia.html
to file <big-data-visualisation/week2/2.23-Create-an-interactive-map-using-D3.js_australia.html> ...
Traceback (most recent call last):
File "C:\Python35\lib\site-packages\requests\packages\urllib3\connection.py", line 142, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "C:\Python35\lib\site-packages\requests\packages\urllib3\util\connection.py", line 91, in create_connection
raise err
File "C:\Python35\lib\site-packages\requests\packages\urllib3\util\connection.py", line 81, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python35\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 578, in urlopen
chunked=chunked)
File "C:\Python35\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 362, in _make_request
conn.request(method, url, **httplib_request_kw)
File "C:\Python35\lib\http\client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "C:\Python35\lib\http\client.py", line 1151, in _send_request
self.endheaders(body)
File "C:\Python35\lib\http\client.py", line 1102, in endheaders
self._send_output(message_body)
File "C:\Python35\lib\http\client.py", line 934, in _send_output
self.send(msg)
File "C:\Python35\lib\http\client.py", line 877, in send
self.connect()
File "C:\Python35\lib\site-packages\requests\packages\urllib3\connection.py", line 167, in connect
conn = self._new_conn()
File "C:\Python35\lib\site-packages\requests\packages\urllib3\connection.py", line 151, in _new_conn
self, "Failed to establish a new connection: %s" % e)
requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.HTTPConnection object at 0x03DF9530>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target mac
hine actively refused it
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python35\lib\site-packages\requests\adapters.py", line 403, in send
timeout=timeout
File "C:\Python35\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 623, in urlopen
_stacktrace=sys.exc_info()[2])
File "C:\Python35\lib\site-packages\requests\packages\urllib3\util\retry.py", line 281, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /australia.html (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object
at 0x03DF9530>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python35\Scripts\futurelearn-dl.py", line 627, in
getCourseWeekStepPage(course_id, week_id, step_id, week_num, title)
File "C:\Python35\Scripts\futurelearn-dl.py", line 232, in getCourseWeekStepPage
downloadURLsInPage(course_id, week_id, step_id, week_num, content, DOWNLOAD_TYPE, page_title)
File "C:\Python35\Scripts\futurelearn-dl.py", line 386, in downloadURLsInPage
downloadURLInPage(url, download_dir, DOWNLOAD_TYPE, page_title)
File "C:\Python35\Scripts\futurelearn-dl.py", line 452, in downloadURLInPage
downloadURLToFile(url, ofile, DOWNLOAD_TYPE)
File "C:\Python35\Scripts\futurelearn-dl.py", line 405, in downloadURLToFile
response = session.get(url, headers=headers)
File "C:\Python35\lib\site-packages\requests\sessions.py", line 487, in get
return self.request('GET', url, **kwargs)
File "C:\Python35\lib\site-packages\requests\sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "C:\Python35\lib\site-packages\requests\sessions.py", line 585, in send
r = adapter.send(request, **kwargs)
File "C:\Python35\lib\site-packages\requests\adapters.py", line 467, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /australia.html (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x03DF9530>
: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))
from futurelearn-dl.
from futurelearn-dl.
I'll patiently wait until you find the time to solve this issue. Let me know if you need me to try anything specific.
Update: In the meantime, I have tried downloading other courses as well. They all work, but the unicode errors remain.
The original course (big-data-visualisation, v2) above still gives the original errors, so it appears that there is something specific with that course.
from futurelearn-dl.
Related Issues (16)
- unable to download HOT 2
- Invalid Syntax with Python 3.6 HOT 1
- license missing HOT 1
- FATAL:No quote(char=\) in <<o <a href=\"http://w...>> HOT 4
- Failing to Download PDFs Ends Download: Long outstanding issue! HOT 1
- Token Failure
- SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')))
- FATAL:downloadURLInPage: Unhandled escape sequence in filename (how to sort this out?) HOT 2
- Any way that one can skip an offending file?
- ssl error HOT 1
- error and mp4 download issue
- Incomplete download
- error when launching the script on Windows 7 HOT 4
- FATAL:getCoursePage: No week entries found - check your courseid and the courserun HOT 7
- [SOLVED] Download dies with 'FATAL:No quote(char=\) in <<t;<a href=\"/profile...>>' HOT 5
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 futurelearn-dl.