Skip to content

hello thanks for the code #1

@MightyTedKim

Description

@MightyTedKim

hello thanks for the code
I'vce put some prints in the code to check where i am
and think writer.writeheader() part is the problem.
can give me a tip how to go through this propblem?

thanks

start
main.py name: main
retrieving stores
retry: 0
processing store details
Writing scraped data to 20005_stores.csv
writer: <csv.DictWriter object at 0x000001CCC3B55B70>
Traceback (most recent call last):
File "walmart_store_locator.py", line 77, in
writer.writeheader()
File "C:\ProgramData\Anaconda3\lib\csv.py", line 144, in writeheader
self.writerow(header)
File "C:\ProgramData\Anaconda3\lib\csv.py", line 155, in writerow
return self.writer.writerow(self._dict_to_list(rowdict))
TypeError: a bytes-like object is required, not 'str'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions