practical-data-science / ShopifyScraper

Shopify Scraper package to extract all products from a Shopify site and return them in a Pandas dataframe.
28 stars 5 forks source link

error on fetching images #2

Open umair975 opened 1 year ago

umair975 commented 1 year ago

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 commented 1 year ago

Same for me (sorry for the up)

DeflateAwning commented 11 months ago

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

genmancoder commented 6 months ago

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