sparckles / starfyre

A reactive, WASM based SSR Python Web Framework for Front-End Applications
http://sparckles.cloud/starfyre/
BSD 2-Clause "Simplified" License
511 stars 19 forks source link

FileNotFoundError: [Errno 2] No such file or directory: '<contextlib._GeneratorContextManager object at 0x7f3a93ff4a50>' #120

Closed oroppas closed 11 months ago

oroppas commented 11 months ago

Hi,

Building the simple app by following README.md as python -m starfyre --create="my-app" then executing build.sh in my-app resulted in FileNotFoundError. Am I missing something obvious?

python -m starfyre --build --path "."
Absolute path of the project = /home/ryutas/packages/wasm/starfyre/tmp/my-app
This is the working directory /home/ryutas/packages/wasm/starfyre/tmp/my-app/pages ../styles/index.css
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/ryutas/packages/wasm/starfyre/venv/lib/python3.11/site-packages/starfyre/__main__.py", line 80, in <module>
    main()
  File "/home/ryutas/packages/wasm/starfyre/venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ryutas/packages/wasm/starfyre/venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/ryutas/packages/wasm/starfyre/venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ryutas/packages/wasm/starfyre/venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ryutas/packages/wasm/starfyre/venv/lib/python3.11/site-packages/starfyre/__main__.py", line 52, in main
    create_dist(file_routes=file_routes, project_dir_path=absolute_path)
  File "/home/ryutas/packages/wasm/starfyre/venv/lib/python3.11/site-packages/starfyre/dist_builder.py", line 133, in create_dist
    write_js_file(project_dir_path)
  File "/home/ryutas/packages/wasm/starfyre/venv/lib/python3.11/site-packages/starfyre/dist_builder.py", line 19, in write_js_file
    shutil.copy(str(js_store), str(store_path))
  File "/usr/lib/python3.11/shutil.py", line 419, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.11/shutil.py", line 256, in copyfile
    with open(src, 'rb') as fsrc:
         ^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '<contextlib._GeneratorContextManager object at 0x7fc3029a3810>'
sansyrox commented 11 months ago

Hey @oroppas 👋

Thank you for reporting the issue. I have a fix ready. It will be fixed in the latest version 😄

sansyrox commented 11 months ago

Hey @oroppas 👋

It has been fixed in v0.19.4

oroppas commented 11 months ago

Hi @sansyrox

Thanks for the fix!