GithubHelp home page GithubHelp logo

Comments (6)

jaintj95 avatar jaintj95 commented on July 26, 2024 3

@humanfactors From the logs you shared, your python version is clearly 32 bit. If you have a 64bit system, you need to uninstall python and reinstall the 64 bit package

from springer_free_books.

kodabey avatar kodabey commented on July 26, 2024

If you install the 32 bit version of Python, this script will throw an error on fast internet connections, since the memory buffer size shoots over what 32 bit python can handle. Installing the 64 bit version mitigates the issue.

from springer_free_books.

humanfactors avatar humanfactors commented on July 26, 2024

I'm also getting constant memory errors in 64bit python.

MemoryError                               Traceback (most recent call last)
<ipython-input-4-beb7b710717e> in <module>
     35 
     36     if not os.path.exists(output_file):
---> 37         myfile = requests.get(new_url, allow_redirects=True)
     38         try:
     39             open(output_file, 'wb').write(myfile.content)

c:\program files (x86)\python36-32\lib\site-packages\requests\api.py in get(url, params, **kwargs)
     74 
     75     kwargs.setdefault('allow_redirects', True)
---> 76     return request('get', url, params=params, **kwargs)
     77 
     78 

c:\program files (x86)\python36-32\lib\site-packages\requests\api.py in request(method, url, **kwargs)
     59     # cases, and look like a memory leak in others.
     60     with sessions.Session() as session:
---> 61         return session.request(method=method, url=url, **kwargs)
     62 
     63 

c:\program files (x86)\python36-32\lib\site-packages\requests\sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
    528         }
    529         send_kwargs.update(settings)
--> 530         resp = self.send(prep, **send_kwargs)
    531 
    532         return resp

c:\program files (x86)\python36-32\lib\site-packages\requests\sessions.py in send(self, request, **kwargs)
    681 
    682         if not stream:
--> 683             r.content
    684 
    685         return r

c:\program files (x86)\python36-32\lib\site-packages\requests\models.py in content(self)
    827                 self._content = None
    828             else:
--> 829                 self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
    830 
    831         self._content_consumed = True

MemoryError: 

I've had to reset the download start point at least 15 - 20 times....

Update: I'm a fatigued derp today thanks team

from springer_free_books.

alexgand avatar alexgand commented on July 26, 2024

I'm also getting constant memory errors in 64bit python.

Strange. How much RAM do you have in your system?

from springer_free_books.

kodabey avatar kodabey commented on July 26, 2024

This might not be the right place to be post this but in the interest of helping newer coders...the 64 bit version of Microsoft Windows Python doesn't update your path variable correctly on install so you have to do that manually for the windows instructions on the main page of this script to work.

from springer_free_books.

humanfactors avatar humanfactors commented on July 26, 2024

Thanks all, to be honest I'm surprised I even have a 32bit install on here. Thanks for the help @kodabey ๐Ÿ˜€

from springer_free_books.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.