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

local variable referenced before assignment #121

Closed
JoyMonteiro opened this issue Nov 28, 2016 · 0 comments
Closed

local variable referenced before assignment #121

JoyMonteiro opened this issue Nov 28, 2016 · 0 comments

Comments

@JoyMonteiro
Copy link

JoyMonteiro commented Nov 28, 2016

Hello!

I am trying to use datreant in one of my projects. I was trying to read a directory

my_data = dtr.Tree('/data/')
my_data.trees.children

and the second line crashes saying local variable out used before assignment.

Tried looking at the code, and it is assumed that out will exist no matter what happens.

I tried seeing which directory it failed on, and turns out there was a 'lost+found' directory
put in there by which my user did not have permission to open. When I ran scandir.walk()
on this directory, it gives nothing, and therefore, the variable out is never created.

Is there some way to make this code robust against scandir.walk() failing?

TIA,
Joy

@dotsdl dotsdl closed this as completed in 11e35ee Nov 3, 2018
dotsdl added a commit that referenced this issue Nov 3, 2018
Also, updated changelog and version to a dev version
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