Skip to content

UnicodeEncodeError: 'charmap' codec can't encode characters in position 2-13: character maps to <undefined> #25

@wan-andrea

Description

@wan-andrea

I tried to use
instagram-location-search --lat 18.78 --lng 98.98 --csv locs.csv

But it throws an error whenever it tries to bring me to the login page for Instagram.

UnicodeEncodeError: 'charmap' codec can't encode characters in position 2-13: character maps to <undefined>
PS C:\Users\USER\downloads> instagram-location-search --lat 18.78 --lng 98.98 --csv locs.csv 

DevTools listening on ws://127.0.0.1:63333/devtools/browser/2ac137bc-ce41-4282-9c1b-bfa2566d473a
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\USER\AppData\Local\Programs\Python\Python311\Scripts\instagram-location-search.exe\__main__.py", line 7, in <module>
  File "C:\Users\USER\AppData\Local\Programs\Python\Python311\Lib\site-packages\instagram_locations\instagram_locations.py", line 264, in main
    writer.writerow(row)
  File "C:\Users\USER\AppData\Local\Programs\Python\Python311\Lib\csv.py", line 154, in writerow
    return self.writer.writerow(self._dict_to_list(rowdict))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\USER\AppData\Local\Programs\Python\Python311\Lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions