mlbvn / ml-yearning-vi

Một cuốn sách tập trung vào hướng dẫn cách cấu trúc các dự án Học Máy và phân tích cách làm cho các thuật toán Học Máy hoạt động.
894 stars 342 forks source link

Lỗi tạo bản html khi chạy run.py #502

Closed rootonchair closed 4 years ago

rootonchair commented 4 years ago

Mình sử dụng Docker để gen file thì nhận được kết quả như bên dưới: book_en_vn.pdfbook_vn.pdf image

cùng với thông báo lỗi sau:

Exporting to ./chapters/book_vn.html
 * Error: could not retrieve styles: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /joeyespo/grip (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fe9f5d12400>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
[2020-01-01 15:39:44,301] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/urllib3/connection.py", line 157, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/usr/local/lib/python3.6/dist-packages/urllib3/util/connection.py", line 61, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 376, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 994, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.6/dist-packages/urllib3/connection.py", line 334, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.6/dist-packages/urllib3/connection.py", line 169, in _new_conn
    self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7fe9f5d12358>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.6/dist-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /markdown/raw (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fe9f5d12358>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.6/dist-packages/grip/app.py", line 174, in _render_page
    content = self.renderer.render(text, self.auth)
  File "/usr/local/lib/python3.6/dist-packages/grip/renderers.py", line 77, in render
    r = requests.post(url, headers=headers, data=data, auth=auth)
  File "/usr/local/lib/python3.6/dist-packages/requests/api.py", line 116, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /markdown/raw (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fe9f5d12358>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))

Có vẻ như module grip gặp lỗi khi cố gắng lấy yêu cầu nào đó từ github. Em chạy chay grip thì vẫn gen được bình thường.

@quangnhat185 anh check nhé

tiepvupsu commented 4 years ago

hmm, không lẽ github giờ hạn số lần gửi yêu cầu. Mình thử build lại docker rồi chạy xem @rootonchair.

rootonchair commented 4 years ago

@tiepvupsu em đã thử nhiều lần nhưng vẫn ra cùng một kết quả

tiepvupsu commented 4 years ago

@rootonchair anh build lại ok rồi. #503

rootonchair commented 4 years ago

Thank anh, vậy chắc máy em có vấn đề rồi.

@quangnhat185 có vẻ vấn đề đến từ Docker trên Windows bên em. Làm phiền anh rồi.


Edit: Bây giờ em mới run lại thì bình thường lại rồi 😵