Преглед на файлове

#681 add note about possible TypeError

Falko Schindler преди 2 години
родител
ревизия
83efbc9aa9
променени са 1 файла, в които са добавени 10 реда и са изтрити 0 реда
  1. 10 0
      website/documentation.py

+ 10 - 0
website/documentation.py

@@ -766,4 +766,14 @@ def create_full() -> None:
             ```
         ''')
 
+    ui.markdown('''
+        **Note:**
+        If you're getting an error "TypeError: a bytes-like object is required, not 'str'", try adding the following lines to the top of your `main.py` file:
+        ```py
+        import sys
+        sys.stdout = open('logs.txt', 'w')
+        ```
+        See <https://github.com/zauberzeug/nicegui/issues/681> for more information.
+    ''')
+
     ui.element('div').classes('h-32')