瀏覽代碼

#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')