Open Fahrenheit opened 3 years ago
@Fahrenheit script works correctly, just tested it today 16 January 2021 in a Colab notebook.
@Fahrenheit script works correctly, just tested it today 16 January 2021 in a Colab notebook.
Odd, I still can't get it to work.
@Fahrenheit are you using the Flickr API key
and secret
as in the README instructions?
https://github.com/ultralytics/flickr_scraper#use
@Fahrenheit are you using the Flickr API
key
andsecret
as in the README instructions? https://github.com/ultralytics/flickr_scraper#use
Yes, I am. I'll try a new API key and see if that works.
I think this might be related to the deprecation of getchildren
in Python 3.9. See https://docs.python.org/3.8/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.getchildren.
@guillaumedavidphd thanks for the info! We don't use this in ultralytics/flickr_scraper but I see it is used in the flickrapi package.
@Fahrenheit perhaps downgrading your python to 3.8 might solve this?
Thanks this worked !!
Hi i did help with someone with this error on python-forum.io
First show how to run Python 3.8 in environment with py(no need to downgrade)
# Make environment with Python 3.8
G:\div_code\py -3.8 -m venv flick38_env
Then i looked at error.
In core.py line 690.
#photoset = rsp.getchildren()[0]
photoset = list(rsp)[0] # Fix for Python 3.9
Test with Python 3.9
(flick_env) G:\div_code\flick_env\flickr_scraper (master)
λ python flickr_scraper.py --search "bees" --n 10 --download
0/10 https://live.staticflickr.com/5537/14142817779_8786627929_o.jpg
1/10 https://live.staticflickr.com/829/41747732682_f4f10ec204_o.jpg
2/10 https://live.staticflickr.com/1662/23809746334_c22950a054_o.jpg
3/10 https://live.staticflickr.com/4094/4822128168_415b5ce1e4_o.jpg
4/10 https://farm6.staticflickr.com/5511/12638717365_7643b6e19a_b.jpg
5/10 https://live.staticflickr.com/961/27921370568_0795b91dfb_o.jpg
6/10 https://farm2.staticflickr.com/1646/26540040015_54f071db32_b.jpg
7/10 https://farm8.staticflickr.com/7377/26868463353_6da2da165d_b.jpg
8/10 https://farm8.staticflickr.com/7595/17187249975_b1ccddea5f_b.jpg
9/10 https://farm2.staticflickr.com/1578/26186589965_678bd3c5a4_b.jpg
Hi i did help with someone with this error on python-forum.io First show how to run Python 3.8 in environment with py(no need to downgrade)
# Make environment with Python 3.8 G:\div_code\py -3.8 -m venv flick38_env
Then i looked at error. In core.py line 690.
#photoset = rsp.getchildren()[0] photoset = list(rsp)[0] # Fix for Python 3.9
Test with Python 3.9
(flick_env) G:\div_code\flick_env\flickr_scraper (master) λ python flickr_scraper.py --search "bees" --n 10 --download 0/10 https://live.staticflickr.com/5537/14142817779_8786627929_o.jpg 1/10 https://live.staticflickr.com/829/41747732682_f4f10ec204_o.jpg 2/10 https://live.staticflickr.com/1662/23809746334_c22950a054_o.jpg 3/10 https://live.staticflickr.com/4094/4822128168_415b5ce1e4_o.jpg 4/10 https://farm6.staticflickr.com/5511/12638717365_7643b6e19a_b.jpg 5/10 https://live.staticflickr.com/961/27921370568_0795b91dfb_o.jpg 6/10 https://farm2.staticflickr.com/1646/26540040015_54f071db32_b.jpg 7/10 https://farm8.staticflickr.com/7377/26868463353_6da2da165d_b.jpg 8/10 https://farm8.staticflickr.com/7595/17187249975_b1ccddea5f_b.jpg 9/10 https://farm2.staticflickr.com/1578/26186589965_678bd3c5a4_b.jpg
thank you.. you saved me
Hi i did help with someone with this error on python-forum.io First show how to run Python 3.8 in environment with py(no need to downgrade)
# Make environment with Python 3.8 G:\div_code\py -3.8 -m venv flick38_env
Then i looked at error. In core.py line 690.
#photoset = rsp.getchildren()[0] photoset = list(rsp)[0] # Fix for Python 3.9
Test with Python 3.9
(flick_env) G:\div_code\flick_env\flickr_scraper (master) λ python flickr_scraper.py --search "bees" --n 10 --download 0/10 https://live.staticflickr.com/5537/14142817779_8786627929_o.jpg 1/10 https://live.staticflickr.com/829/41747732682_f4f10ec204_o.jpg 2/10 https://live.staticflickr.com/1662/23809746334_c22950a054_o.jpg 3/10 https://live.staticflickr.com/4094/4822128168_415b5ce1e4_o.jpg 4/10 https://farm6.staticflickr.com/5511/12638717365_7643b6e19a_b.jpg 5/10 https://live.staticflickr.com/961/27921370568_0795b91dfb_o.jpg 6/10 https://farm2.staticflickr.com/1646/26540040015_54f071db32_b.jpg 7/10 https://farm8.staticflickr.com/7377/26868463353_6da2da165d_b.jpg 8/10 https://farm8.staticflickr.com/7595/17187249975_b1ccddea5f_b.jpg 9/10 https://farm2.staticflickr.com/1578/26186589965_678bd3c5a4_b.jpg
thank you.. you saved me
worked for me ,thanks
@beautytasara27 you save me, thank you so much.
I attempted to use the command suggested and have tried to pull other things however I always get this error. It creates the necessary folders, but won't grab any of the photos. Not quite sure how to fix this. Any help would be much appreciated!