You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### For Windows users printing to _cmd_ or _powershell_
60
+
You will encounter an error if you attempt to print the .json() object to the command line. This is because the '{', '}' curly braces to be printed to the console.
61
+
This becomes especially annoying if developers wish to get 'under the hood'.
62
+
63
+
Here is the error:
64
+
UnicodeEncodeError: 'charmap' codec can't encode character '\u2019' in position 1444: character maps to <undefined>
65
+
66
+
This can be fixed by:
67
+
- installing 'win-unicode-console'
68
+
`py -mpip install win-unicode-console`
69
+
- then running it while calling your python script...
70
+
`py -mrun myPythonScript.py`
71
+
72
+
Another option is hardcoding your console to only print in utf-8. This is a bad idea, as it could ruin many other scripts and/or make errors MUCH more difficult to track.
0 commit comments