Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploading firmware from local dir throws Memory Error when running on Windows 10 VM #23

Open
tanmayx opened this issue Oct 9, 2016 · 2 comments

Comments

@tanmayx
Copy link

tanmayx commented Oct 9, 2016

ucscentralsdk version: Latest from github
Python version: 3.5.2
Operating System: Windows 10 VM

Description
Trying to upload firmware using firmware_add_local API. It is throwing memory error.

What I Did
Ran the following command-
firmware_add_local(handle=handle, local_path=local_dir_path, file_name="ucs-k9-bundle-infra.3.1.2b.A.bin")

The output is -
c:\users\tanmay\appdata\local\programs\python\python35-32\lib\site-packages\ucscentralsdk-0.9.0.0-py3.5.egg\ucscentralsdk\ucscentralgenutils.py in encode_file_data(file_path)
227 def encode_file_data(file_path):
228 with open(file_path, "rb") as f:
--> 229 mmapped_file = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
230 return mmapped_file.read(mmapped_file.size())
231

OSError: [WinError 8] Not enough storage is available to process this command

@tanmayx
Copy link
Author

tanmayx commented Oct 9, 2016

Rechecked it with python 2.7.12 and it works fine. Hence the issue is because of latest python version 3.5.2

@tanmayx
Copy link
Author

tanmayx commented Oct 9, 2016

Now the issue is observed with python 2.7.12 also. With this version, it sometimes upload successfully and sometimes it throws error. It is in-consistent, it uploads one file but if tried to upload once again after deleting it from central, it throws error.
Was able to upload classic A and B bundles.
Never able to upload classic C bundle and mini A bundle.

With version 3.5.2, it never uploaded successfully even once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant