Skip to content

http.client.IncompleteRead: IncompleteRead error #253

Closed

Description

@milind-shakya-sp
$ nodeenv --prebuilt --node=10.16.0 --python-virtualenv
 * Install prebuilt node (10.16.0) .Traceback (most recent call last):
  File "/srv/env/bin/nodeenv", line 8, in <module>
    sys.exit(main())
  File "/srv/env/lib/python3.6/site-packages/nodeenv.py", line 1010, in main
    create_environment(env_dir, opt)
  File "/srv/env/lib/python3.6/site-packages/nodeenv.py", line 843, in create_environment
    install_node(env_dir, src_dir, opt)
  File "/srv/env/lib/python3.6/site-packages/nodeenv.py", line 658, in install_node
    download_node_src(node_url, src_dir, opt, prefix)
  File "/srv/env/lib/python3.6/site-packages/nodeenv.py", line 534, in download_node_src
    dl_contents = io.BytesIO(urlopen(node_url).read())
  File "/opt/Python-3.6.8/lib/python3.6/http/client.py", line 462, in read
    s = self._safe_read(self.length)
  File "/opt/Python-3.6.8/lib/python3.6/http/client.py", line 614, in _safe_read
    raise IncompleteRead(b''.join(s), amt)
http.client.IncompleteRead: IncompleteRead(13844233 bytes read, 6305259 more expected)

Encoutering this with versions 1.1.2 as well as the latest 1.3.5

Activity

  1. asottile commented on Apr 6, 2020

    @asottile
    Contributor

    This happens when nodejs.org has a blip or the local network has a blip -- I don't think there's anything fixable here

  2. yhoiseth commented on Apr 6, 2020

    @yhoiseth

    Could it be an alternative to show an error message with the URL of the service that doesn't work? I think that would make the error easier to troubleshoot.

    (I experienced this issue in pre-commit, and wasn't able to figure out that it was related to nodeenv.)

  3. milind-shakya-sp commented on Apr 6, 2020

    @milind-shakya-sp
    Author
  4. adithyabsk commented on Apr 6, 2020

    @adithyabsk

    Can confirm that I'm running into this issue as well. Haven't gotten a chance to debug it

  5. ekalinin commented on Apr 7, 2020

    @ekalinin
    Owner

    Hi,

    Thanks for report, but it looks like a network issue.
    Just tested:

    ➜ cat /etc/issue                                
    Ubuntu 18.04.4 LTS \n \l
    
    ➜ virtualenv test-nodeenv-env                   
    Running virtualenv with interpreter /usr/bin/python2
    New python executable in ~/tmp/test-nodeenv-env/bin/python2
    Also creating executable in ~/tmp/test-nodeenv-env/bin/python
    Installing setuptools, pkg_resources, pip, wheel...done.
    
    ➜ pip install nodeenv
    Collecting nodeenv
      Downloading nodeenv-1.3.5-py2.py3-none-any.whl (21 kB)
    Installing collected packages: nodeenv
    Successfully installed nodeenv-1.3.5
    
    ➜ nodeenv --prebuilt --node=10.16.0 --python-virtualenv
    
     * Install prebuilt node (10.16.0) ..... done.
     * Appending data to ~/tmp/test-nodeenv-env/bin/activate
     * Appending data to ~/tmp/test-nodeenv-env/bin/activate.fish
    
    ➜ node -v
    v10.16.0
  6. adithyabsk commented on Apr 7, 2020

    @adithyabsk

    @ekalinin you're likely right. Something upstream must have been down as my CI build process started working again. This can likely be closed.

  7. milind-shakya-sp commented on Apr 7, 2020

    @milind-shakya-sp
    Author

    Closing this. Looks like it was network issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions