sc1341 / InstagramOSINT

An Instagram Open Source Intelligence Tool - Archive
MIT License
1.25k stars 223 forks source link

UnicodeEncodeError #6

Closed fkoussa closed 7 months ago

fkoussa commented 5 years ago

Note that this script works using cmd on Windows 10, however, it does not run when using gitBash.

python main.py --username valid_instagram_user

Traceback (most recent call last):
  File "main.py", line 201, in <module>
    main()
  File "main.py", line 192, in main
    print(colors.OKBLUE + banner + colors.ENDC)
  File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python37-32\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 9-15: character maps to <undefined>

After commenting out everything that has to do with the colors class, I get this error.

$ python main.py --username valid_instagram_user
[*] Starting Scan on valid_instagram_user
Saved data to directory C:\Users\xxxxx\Documents\Tools\OSINT\InstagramOSINT\valid_instagram_user
---------------------------------------------
Results: scan for valid_instagram_user on Instagram
Username: valid_instagram_user
Traceback (most recent call last):
  File "main.py", line 201, in <module>
    main()
  File "main.py", line 197, in main
    osint = InstagramOSINT(username=args.username[0], downloadPhotos=args.downloadPhotos)
  File "main.py", line 97, in __init__
    self.print_data()
  File "main.py", line 170, in print_data
    print(key + ':' + value)
  File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python37-32\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\U00013153' in position 13: character maps to <undefined>
sc1341 commented 5 years ago

Hello!

Thank you for bringing this up! I am about to commit a change that will fix this issue.

Thanks! sc1341

sc1341 commented 5 years ago

Committed into the main branch

fkoussa commented 5 years ago

Issue is still valid. Issue