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

error on fetching images #2

Open
umair975 opened this issue Apr 26, 2023 · 3 comments · May be fixed by #4
Open

error on fetching images #2

umair975 opened this issue Apr 26, 2023 · 3 comments · May be fixed by #4

Comments

@umair975
Copy link

File "/Users/aaa/Desktop/ss2/s.py", line 15, in
images = scraper.get_images(parents)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/shopify_scraper/scraper.py", line 141, in get_images
return json_list_to_df(df_products, 'images')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/shopify_scraper/scraper.py", line 124, in json_list_to_df
for index, row in df[col].iteritems():
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pandas/core/generic.py", line 5989, in getattr
return object.getattribute(self, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Series' object has no attribute 'iteritems'

@AnatoleT
Copy link

Same for me (sorry for the up)

@DeflateAwning
Copy link

This issue is a result of using the now-deprecated df.iteritems method, but not requiring pandas<2. I may fix soon.

@genmancoder
Copy link

genmancoder commented Mar 30, 2024

just changes iteritems to items

rows = [] for index, row in df[col].items(): for item in row: rows.append(item) df = pd.DataFrame(rows) return df

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants