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

Build of the initial app failing due to dist_builder.py #143

Open lasagnats opened 8 months ago

lasagnats commented 8 months ago

Currently, when attempting to build the auto-generated app, the following error is thrown (see the attached image) image

Starfyre version: 0.21.0

Steps to reproduce it:

  1. Clean install v0.21.0 via pip
  2. Execute starfyre --create="starfyre", which generates a default app
  3. Without making any adjustments or changes to the generated code, navigate to the created folder and from it run python3 -m starfyre --build --path="."

The issue is related to the piece of code shown in the picture below. For the autogenerated application, in dist_builder.py, line 144, the value of data["js_modules"] is ['is_even']. But then, there is an attempt to retrieve a value from this list by a key of type string: url = data["js_modules"][js_module] , where js_module value is 'is_even' on the first (and in this case - only) iteration of the loop. Hence, the error - Indices of lists cannot be str.

image

It seems that toml.load() returns data in a different format than is expected.

line 137, data = toml.load(f) image

goSeeFuture commented 6 months ago

back to v0.19.4 will ok