Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

glob() got an unexpected keyword argument 'recursive'

Tags:

python

glob

I try to run a script that uses the glob() function, but it gives me this error:

imagePatches = glob('/kaggle/input/IDC_regular_ps50_idx5/**/*.png', recursive=True)
TypeError: glob() got an unexpected keyword argument 'recursive'

im using python2.7

like image 601
Siham Avatar asked Jan 27 '23 08:01

Siham


1 Answers

Support for ** and the recursive argument was only added in Python 3.5.

The Python 2 version of glob only takes a single argument.

like image 133
melpomene Avatar answered Mar 06 '23 22:03

melpomene