reflex-dev / reflex

🕸️ Web apps in pure Python 🐍
https://reflex.dev
Apache License 2.0
20.14k stars 1.16k forks source link

AssertionError: Title must be a single string #3326

Open BryanLitardo312 opened 5 months ago

BryanLitardo312 commented 5 months ago

Hello,

I'm running reflex and got the next error, does not finish compiling, stop en 86%.

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\brodriguezl\Documents\Reflex\.venv\Scripts\reflex.exe\__main__.py", line 7, in <module>
  File "C:\Users\brodriguezl\Documents\Reflex\.venv\Lib\site-packages\typer\main.py", line 326, in __call__
    raise e
  File "C:\Users\brodriguezl\Documents\Reflex\.venv\Lib\site-packages\typer\main.py", line 309, in __call__
    return get_command(self)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\brodriguezl\Documents\Reflex\.venv\Lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\brodriguezl\Documents\Reflex\.venv\Lib\site-packages\typer\core.py", line 723, in main
    return _main(
           ^^^^^^
  File "C:\Users\brodriguezl\Documents\Reflex\.venv\Lib\site-packages\typer\core.py", line 193, in _main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "C:\Users\brodriguezl\Documents\Reflex\.venv\Lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\brodriguezl\Documents\Reflex\.venv\Lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\brodriguezl\Documents\Reflex\.venv\Lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\brodriguezl\Documents\Reflex\.venv\Lib\site-packages\typer\main.py", line 692, in wrapper
    return callback(**use_params)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\brodriguezl\Documents\Reflex\.venv\Lib\site-packages\reflex\reflex.py", line 256, in run
    _run(env, frontend, backend, frontend_port, backend_port, backend_host, loglevel)
  File "C:\Users\brodriguezl\Documents\Reflex\.venv\Lib\site-packages\reflex\reflex.py", line 182, in _run
    prerequisites.get_compiled_app()
  File "C:\Users\brodriguezl\Documents\Reflex\.venv\Lib\site-packages\reflex\utils\prerequisites.py", line 275, in get_compiled_app
    app._compile(export=export)
  File "C:\Users\brodriguezl\Documents\Reflex\.venv\Lib\site-packages\reflex\app.py", line 938, in _compile
    compile_results.append(future.result())
                           ^^^^^^^^^^^^^^^
  File "C:\Users\brodriguezl\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\brodriguezl\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\_base.py", line 401, in __get_result
    raise self._exception
  File "C:\Users\brodriguezl\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\brodriguezl\Documents\Reflex\.venv\Lib\site-packages\reflex\compiler\compiler.py", line 548, in compile_page
    return compile_page(*cls.COMPILE_PAGE_ARGS_BY_ROUTE[route])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\brodriguezl\Documents\Reflex\.venv\Lib\site-packages\reflex\compiler\compiler.py", line 414, in compile_page
    code = _compile_page(component, state)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              ^^^^^^^^^^^^^^
  File "C:\Users\brodriguezl\Documents\Reflex\.venv\Lib\site-packages\reflex\components\base\meta.py", line 23, in render
    assert len(self.children) == 1 and isinstance(
AssertionError: Title must be a single string.
masenf commented 5 months ago

What code reproduces this issue?

BryanLitardo312 commented 5 months ago

Hi, I share the link of my project (Web), I think that it is a configuration error in the router

https://github.com/BryanLitardo312/Proyecto-Web/tree/b2f266e9a263e8565fadaef09bd181dea01da77b/Web

ElijahAhianyo commented 5 months ago

@BryanLitardo312 can you provide a smaller reproducible code of the issue instead? That would be a lot more helpful than having to set up and run your project