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

Permission issue in filequeue Windows #5

Closed
MilindPurswani opened this issue Oct 3, 2019 · 7 comments
Closed

Permission issue in filequeue Windows #5

MilindPurswani opened this issue Oct 3, 2019 · 7 comments

Comments

@MilindPurswani
Copy link

Hello @GP89,

I am facing some Permission issues in windows with FileQueue Library. Here is the error code:

PS > python .\syborg.py domain.com
Traceback (most recent call last):
  File ".\syborg.py", line 174, in <module>
    q = filequeue.FileQueue(maxsize=1000)
  File "C:\Python36\lib\site-packages\filequeue\filequeue.py", line 53, in __init__
    self._init_fds()
  File "C:\Python36\lib\site-packages\filequeue\filequeue.py", line 56, in _init_fds
    self._file_write = _file_open(self._temp_file.name, "wb")
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Yash\\AppData\\Local\\Temp\\tmpqnp_lbdw.queue'

Kindly check MilindPurswani/Syborg#6 for more info.

Thanks,

-Milind

@GP89
Copy link
Owner

GP89 commented Oct 6, 2019

Hey, I see the issue. I'd never tested this on windows before. I should be able to get it sorted at some point in the next few days

@MilindPurswani
Copy link
Author

@GP89, I was wondering. Do you have any similar library for stack? Like a FileStack or something?

@GP89
Copy link
Owner

GP89 commented Oct 7, 2019

Do you mean filequeue.LifoFileQueue? It's a swap in replacement for Queue.LifoQueue.

Just be aware that the to make it strictly always last in first out you need to initialise it with maxsize 0. I could address this issue just never got around to it

@MilindPurswani
Copy link
Author

That sounds about right. But can you clear this one thing for me, if I make maxsize 0, wouldn't that be exactly same as Queue.LifoQueue ?

@GP89
Copy link
Owner

GP89 commented Oct 7, 2019

No sorry I think the parameter name is confusing. Maxsize refers to the size of an in memory buffer before it writes to disk. If maxsize is set to 0 everything will be written to disk. If the number of items constantly stays under maxsize then it will never need to write to disk and will be better performance wise, only if the number of items exceeds maxsize will it overflow and write to disk.

@GP89
Copy link
Owner

GP89 commented Oct 11, 2019

Hey @MilindPurswani
As of version 0.4.0 filequeue should now support windows!
Let me know if it works

@GP89
Copy link
Owner

GP89 commented Nov 8, 2019

Going to go ahead and close this as resolved

@GP89 GP89 closed this as completed Nov 8, 2019
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

2 participants