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

TypeError: glob() got an unexpected keyword argument 'recursive' #15

Open
DanielSmon opened this issue Oct 18, 2017 · 4 comments
Open
Assignees

Comments

@DanielSmon
Copy link

Hi,

I've pulled the latest Docker image from nlesc/massive-potreeconverter, and I'm getting the following error running mpc-info when I supply a directory path, such as:

docker run --mount source=data-ingest,target=/data1 --mount source=data-processed,target=/data2 --mount source=data-temp,target=/data3 nlesc/massive-potreeconverter mpc-info -i /data1 -c 4
('Input folder: ', '/data1/')
('Number of processes: ', 4)
('Target tile number of points: ', 5000000000)
('Target OctTree node number of points: ', 60000)
Starting get_info.pyc...
Execution failed!
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pympc/get_info.py", line 84, in main
    run(args.input, args.proc, args.avgtile, args.avgnode)
  File "/usr/local/lib/python2.7/dist-packages/pympc/get_info.py", line 9, in run
    (_, tcount, tminx, tminy, tminz, tmaxx, tmaxy, tmaxz, _, _, _) = utils.getPCFolderDetails(inputFolder, numberProcs)
  File "/usr/local/lib/python2.7/dist-packages/pympc/utils.py", line 112, in getPCFolderDetails
    inputFiles = getFiles(absPath, recursive=True)
  File "/usr/local/lib/python2.7/dist-packages/pympc/utils.py", line 67, in getFiles
    files.extend(glob.glob(os.path.join(inputElement,'*.' + ext),recursive = recursive))
TypeError: glob() got an unexpected keyword argument 'recursive'

If I specify a las file directly, it works:

docker run --mount source=data-ingest,target=/data1 --mount source=data-processed,target=/data2 --mount source=data-temp,target=/data3 nlesc/massive-potreeconverter mpc-info -i /data1/mymodel/apointcloud.las -c 4
('Input folder: ', '/data1/mymodel/apointcloud.las')
('Number of processes: ', 4)
('Target tile number of points: ', 5000000000)
('Target OctTree node number of points: ', 60000)
Starting get_info.pyc...
Completed 0.00%lasinfo /data1/mymodel/apointcloud.las -nc -nv -nco
Completed 100.00%!()
('AABB: ', 327699, 3640884, 32, 329172, 3641628, 140)
('#Points:', 3939233)
('Average density [pts / m2]:', 3.594479301257765)
Suggested number of tiles: 1. For this number of points Massive-PotreeConverter is not really required!
('Suggested Potree-OctTree CAABB: ', 327699, 3640884, 32, 329172, 3642357, 1505)
('Suggested Potree-OctTree spacing: ', 7.0)
('Suggested Potree-OctTree number of levels: ', 5)
Suggested potreeconverter command:
$(which PotreeConverter) -o <potree output directory> -l 5 -s 7 --CAABB "327699 3640884 32 329172 3642357 1505" --output-format LAZ -i <laz input directory>
Finished in 0.02 seconds

I saw that there was a recent commit to update the file search code, which makes use of glob. But I don't have much python experience to quickly troubleshoot. Anyone else experiencing this issue?

Cheers,
Daniel

@goord
Copy link
Member

goord commented Oct 18, 2017

Hi, it appears I introduced this bug. Apparently the recursive keyword is only supported in python 3.5

@goord goord self-assigned this Oct 18, 2017
@goord
Copy link
Member

goord commented Oct 18, 2017

This should be fixed in a24d2b8
Can you please test once more after pulling the latest version? Thanks.

@DanielSmon
Copy link
Author

@goord thanks for doing that so quickly! I will test it tomorrow at the latest and post my results.

Cheers,
Daniel

@DanielSmon
Copy link
Author

@goord I've tested the latest Docker image, and can confirm this issue is resolved in the latest version.

Thanks again!
Daniel

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