https://genieframework.com logo
Join Discord
Powered by
# help-forum
  • The default app in GenieBuilder has the header "{{message}}"
    g

    grahamas

    03/10/2023, 9:47 PM
    Based on the code, I assume it's supposed to replace {{message}} with "Hello world!" This occurs when I just create a new app in GenieBuilder and do nothing else. Am I missing a step or is my set-up misconfigured? GenieBuilder v0.2.6 GenieFramework v1.9.0 julia> versioninfo() Julia Version 1.8.5 Commit 17cfb8e65ea (2023-01-08 06:45 UTC) Platform Info: OS: Linux (x86_64-linux-gnu) CPU: 16 × AMD Ryzen 9 5900HS with Radeon Graphics WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-13.0.1 (ORCJIT, znver3) Threads: 1 on 16 virtual cores Environment: JULIA_EDITOR = code JULIA_NUM_THREADS =
    a
    • 2
    • 55
  • GenieFramework API docs.
    m

    Monty Hall

    03/11/2023, 11:59 PM
    Where are the docs at for GenieFramework (as in 'using GenieFramework' not just 'using Genie')? I'm doing these tutorials: https://github.com/GenieFramework/GenieFrameworkDemos_NewAPI. But when I go here(https://genieframework.com/docs/genie/v5.11/tutorials/Getting-Started.html) and try to search for GenieFramework, @page, @genietools - I don't come up with anything. So where do I find docs on @page or @genietools?
    p
    • 2
    • 8
  • How to change the default path of geniebuilder
    a

    aomame

    03/12/2023, 3:25 AM
    For example, I want my apps to be in some other folder /path/to/myapps, glancing through the code at https://github.com/GenieFramework/GenieBuilder.jl/blob/7c760f0a2fe5414a73746a36214d437e4650de9a/scripts/rungb.jl#L7-L16 How do I pass the GBDIR/appsdir for the vscode extension to pick it up? Cannot find documentation for this setting. Thanks!
    p
    • 2
    • 1
  • How Local Module work every time there is a change
    a

    ari.agustiansa

    03/13/2023, 9:00 AM
    I make local module in Genie, and I call those module in Controller File like this:
    include("MyModule.jl")
    using .MyModule
    and the code running well. But if change code in file
    MyModule.jl
    , Controller not running as expected. How to make it work properly?
    p
    a
    • 3
    • 6
  • How to make a linechart with dual y axis ?
    k

    kungfupanda007

    03/14/2023, 6:35 AM
    I am using PlotData() and stippleplotly. [PlotData( y = 1:1000, x = 1:1000, plot = StipplePlotly.Charts.PLOT_TYPE_LINE, name = "A", ), PlotData( y = 1:1000, x = 1:1000, plot = StipplePlotly.Charts.PLOT_TYPE_LINE, name = "B", ) ]
    a
    • 2
    • 5
  • @var read only accessor (var_) not honored.
    m

    Monty Hall

    03/16/2023, 8:47 PM
    Changing "n\_" on the server works as expected. Changing n_ on the browser changes it on the server. I was under the impression that this isn't supposed to happen.
    p
    • 2
    • 18
  • Database turorial
    m

    Monty Hall

    03/17/2023, 4:25 AM
    I'm doing this tutorial: https://github.com/GenieFramework/GenieFrameworkDemos_NewAPI/blob/main/Database/app.jl On the server side REPL: "pages()[1].model.prediction.price" returns 31.757. The tab to the right display this. But the left text field "Predicted Price" always comes up "0". What's going on?
    p
    • 2
    • 2
  • ERROR: LoadError: UndefVarError: addenv not defined
    c

    CallError

    03/18/2023, 11:18 AM
    I am getting an error message every time i try to start the Genie Server: addenv not defined What could i do to fix it?
    a
    • 2
    • 12
  • Are there any known memory leaks?
    s

    SchighSchagh

    03/19/2023, 6:43 PM
    I left my genie-based app running for about a week inside a Docker image. Memory usage grew from about 1 GB when just started, to about 8 GB after 8 days uptime. I haven't double checked my code for leaks yet. I wanted to know if I need to check my own code, or if there's known issues that maybe have workarounds.
    p
    h
    • 3
    • 10
  • Accessing reactive variables from Javascript
    m

    Monty Hall

    03/22/2023, 11:54 PM
    I'm toying around to get a sense of how to manipulate data. I'm curious what's an efficient way to access reactive variables from JS. For "function1" is that correct? I'm basically doing: "Main_ReactiveModel.somevariable" from javascript.
    a
    • 2
    • 5
  • How to use the onbutton macro?
    m

    Monty Hall

    03/23/2023, 1:10 AM
    Anybody have a snippet to show how this macro is used?
    a
    • 2
    • 4
  • Removing the CSS Render delay
    n

    Nooji

    03/24/2023, 4:24 PM
    I want to preface I know very little about wed dev. I have a demo of Genie on hugging face and want to understand how I can remove the CSS rendering delay between what looks like the raw HTML and the styling that then gets applied. https://huggingface.co/spaces/nooji/GenieOnHuggingFaceSpaces contains the webapp and the code under
    Files and Versions
    . This is a copy of one of the original boilerplates from the genie framework 🙂 I ask this also because I have other apps where there is a delay between the styles being applied
    p
    • 2
    • 2
  • Plot not updating
    i

    itsdfish

    03/25/2023, 5:44 PM
    Hi all, I am new to Genie and have been going through some tutorials. Unfortunately, I was unable to run some tutorials cloned from git without error. I have been trying to model my code from those examples. Since I do not have much background with JS, I have been using the GenieBuilder (which is nice by the way). For some reason, the plot does not update, but the code appears to run. Here is what I have: app.jl
    Copy code
    module App
    
      using GenieFramework
      using Distributions
    
      function update(mu, sigma)
          x = range(-5, 5, length=100)
          y = pdf.(Normal(mu, sigma), x)
          pdf_plot = PlotData(;x, y, mode="lines")
      end
    
    
      @genietools 
        @handlers begin
          @in mu = 0.0
          @in sigma = 0.0
          @out pdf_plot = PlotData()
    
          @onchange mu, sigma begin 
            update(mu, sigma)
          end
        end
    
      @page("/", "app.jl.html")
      
    end
    app.jl.html
    Copy code
    <h1>Default content</h1>
    <div class="row">
        <div class="col col-6 col-sm">
            <p>mu</p>
            <q-slider :min="-5" :step="-.1" v-model="mu"></q-slider>
        </div>
        <div class="col col-6 col-sm">
            <p>sigma</p>
            <q-slider :min="0" :max="5" :step=".1" v-model="sigma"></q-slider>
        </div>
    </div>
    <div class="row">
        <div class="col col-12 col-sm">
            <p>awesome plot<br /></p>
            <plotly :data="pdf_plot"></plotly>
        </div>
    </div>
    What am I doing wrong? I also have a somewhat different question. Suppose I want to run this code outside of the VSCode builder. What is the recommended way to organize the code and run a startup script?
    p
    h
    • 3
    • 17
  • How to pump images from server to web browser?
    m

    Monty Hall

    03/26/2023, 1:28 AM
    I do a fair amount of open CV stuff. I have an RGB matrix that I'd like to pump to the web browser (let say at 10hz). How can I accomplish this?
    p
    • 2
    • 6
  • Deleted apps won't go away; can't make more apps
    g

    grahamas

    03/26/2023, 7:49 AM
    I figure I should start with the video this time... The first video shows me re-installing Genie Builder (again), with the previously deleted apps immediately reappearing. The second video shows me trying to make another app, recreating the old app directories so that I can open the VSCode terminal, and generally trying to right click on things unsuccessfully and trying to stop the server unsuccessfully. GenieBuilder v0.2.6 GenieFramework v1.9.0 julia> versioninfo() Julia Version 1.8.5 Commit 17cfb8e65ea (2023-01-08 06:45 UTC) Platform Info: OS: Linux (x86_64-linux-gnu) CPU: 16 × AMD Ryzen 9 5900HS with Radeon Graphics WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-13.0.1 (ORCJIT, znver3) Threads: 1 on 16 virtual cores Environment: JULIA_EDITOR = code JULIA_NUM_THREADS =
    video-2023-03-26-00-40-38video-2023-03-26-00-46-51
    p
    i
    a
    • 4
    • 18
  • Dynamic HTML update on change
    d

    DearRude

    03/26/2023, 2:03 PM
    I want to have a dynamic number of `q-toggle`s in my view file. So I implemented something like:
    Copy code
    html
    <div v-for="fil in filters">
      <q-toggle v-model="fil['active']" :label="fil['name']" />
    </div>
    It works fine. However, I want my dynamic list to get updated whenever
    filters
    changes.
    p
    a
    • 3
    • 7
  • How to insert null data into SQLite database using SearchLight.save?
    d

    DearRude

    03/26/2023, 7:22 PM
    I tried
    Union{Missing, String}
    in my model and wanted to pass
    missing
    . However, instead of inserting a null value, the string "missing" is inserted to database.
    p
    • 2
    • 20
  • list of plot options
    i

    itsdfish

    03/27/2023, 10:18 PM
    Hi all, I have a few questions related to plotting. I would like to use Genie to create a dashboard with various plots. Where do I find information about plotting options, such as adding axis labels, turning of grid, setting x and y ranges, ticks etc? Based on a cursory look of the source code, it seems like those are not options that can be passed to the PlotData function. I am fairly familiar with Plots.jl. Is there a way to use that instead? Update: I found PlotLayoutAxis in an example in the app gallery, but it seems like an old version of Genie. Its not clear to me how to add axis labels.
    p
    a
    • 3
    • 25
  • I am running a genie app on aws server, but it is by default limited to run with 1GB RAM (memory)
    k

    kungfupanda007

    03/28/2023, 10:51 AM
    I am running a genie app on aws server, but it is by default limited to run with 1GB RAM (memory) only. How can we change settings and remove this upper-cap on memory usage? Please help.
    p
    c
    • 3
    • 6
  • Page does not load on windows when using GenieBuilder
    i

    itsdfish

    03/29/2023, 8:20 PM
    Hi all, I have used GenieBuilder on Linux without any problems. However, the page does not load in the browser when using Windows. There were no errors displayed in the REPL. Interestingly, the app loads when launched from the command line. What could be the problem?
    a
    • 2
    • 2
  • Best way to build a Julia GUI
    d

    Dale

    03/30/2023, 5:24 AM
    I have a bit of Julia code for manipulating and analyzing medical images. I am going to build a interface for non coders to interact with the images. As far as I can see there are a few different approaches that I could take but I’m not really knowledgeable enough in all of them to know the benefits and downsides. So if you guys have thoughts I would love to hear what you think about the pros and cons. Basic functionality is the ability to load an image from disk along with other files like csv files. Click on a few options for graphing, etc. 1) I could use something like GTK.jl to keep it extremely simple 2) I could use genie to stick with Julia 3) I could use Vue since it seems like Genie already has a close relationship to Vue via stipple 4) I could use Nuxt potentially to build out this GUI in a way that scales seamlessly to a more sophisticated web app. Please let me know if you have thoughts on any of the pros/cons of these approaches or anything I’ve missed
    a
    p
    • 3
    • 3
  • how to debug in GenieBuilder
    i

    itsdfish

    03/30/2023, 9:41 AM
    Hi all, I have a question about debugging with the GenieBuilder. Typically, I use print statements to look at output near an error. However, this does not work in the
    @handlers
    block. For example,
    Copy code
    @handlers begin
      println("hello")
    end
    Does not print to the REPL. Is there a recommended workflow for debugging?
    p
    • 2
    • 2
  • Are there docs for connecting to a hosted postegres database, like supabase, w/ Searchlight?
    d

    Dale

    03/30/2023, 5:47 PM
    You just need an API key, right?
    a
    • 2
    • 3
  • SearchLight/SQLAlchemy interoperabiliity
    d

    DaveMacMahon

    03/31/2023, 4:54 PM
    I need to create a database that will be accessed by both Julia and Python users. I really liked the ActiveRecord ORM from Ruby on Rails so I'm hoping that there are ORM tools in Julia and Python that can both operate with the same database schema. Is it possible to use SearchLight's ORM to access a database created with SQLAlchemy (or other Python ORM tool)? Is it possible to use SQLAlchemy's ORM (or other Python ORM tool) to access a database created with SearchLight?
    p
    • 2
    • 1
  • Genie Auth fails
    k

    kungfupanda007

    03/31/2023, 7:30 PM
    Hi team, I really like the GenieAuth But when I am making a multi page app and routing apps. Using controllers.index @page macro is bypassing the genie auth. Can you please help me in solving this issue? Just for your info, I am using authenticated command even in routes.jl as well as in controllers.index function also before @page . But it is failing.
    p
    • 2
    • 3
  • [error | LibPQ]: SyntaxError with Postgres
    j

    Jesse

    04/01/2023, 6:25 AM
    I'm learning the MVC example "Watch Tonight" at https://genieframework.com/docs/genie/v5.11/tutorials/Developing-MVC-Web-Apps.html, trying to create table movies, and my database is Postgres, and I got the following error: [ Info: SELECT version FROM schema_migrations ORDER BY version DESC WARNING: replacing module CreateTableMovies. [ Info: CREATE TABLE movies (id SERIAL PRIMARY KEY , type VARCHAR (10), title VARCHAR (100), directors VARCHAR (100), actors VARCHAR (250), country VARCHAR (100), year INTEGER (4), rating VARCHAR (10), categories VARCHAR (100), description VARCHAR (1000)) [error | LibPQ]: SyntaxError: error near "(" LINE 1: ...ARCHAR (250), country VARCHAR (100), year INTEGER (4), ratin... ^
    p
    • 2
    • 7
  • autoreload stops working after error in code
    i

    itsdfish

    04/03/2023, 10:42 PM
    Hi all, Autoreload works great when updating my code, except if I make a change that results in an error. When that happens, autoreload uses a previous version of my code. It does not recognize corrections/changes made thereafter. This is really frustrating because I need to restart Julia in order fix autoreload. Is there a way around this or a place where I can file an issue?
    p
    a
    • 3
    • 9
  • How can I make a live data app from a data stream?
    c

    Carboxyl

    04/06/2023, 3:47 AM
    I've set up a demo app here, which creates a threaded model which has a counter updating constantly. What I'd like to do is see the contents of this model update in real time in the web app, but no matter what I do, it doesn't seem to want to work. What am I doing wrong here in terms of initializing my handlers and so forth? https://github.com/Boxylmer/Genie-GUI-test
    a
    • 2
    • 6
  • Mongoc and MongoDB in Genie
    d

    dpshade22

    04/08/2023, 1:24 AM
    For some reason I don't seem to be able to connect to my MongoDB cluster in Genie. I get errors like this: ┌ Error: BSONError: domain=2, code=6, message=Could not establish stream for node ac-vxaajnb-lb.tfaa4sm.mongodb.net:27017: [TLS handshake failed: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed calling hello on 'ac-vxaajnb-lb.tfaa4sm.mongodb.net:27017'] I have tried using a cert file and add it to my connection string, that didn't work. I made sure my Network IP was whitelisted, my connection string was correct, as I could use it for MongoDB Compass. Really not sure how to get past this. Does anyone have any tips?
    a
    • 2
    • 1
  • GenieFramework & Heatmap
    d

    Dale

    04/10/2023, 10:38 PM
    I am creating a webapp that loads an image and outputs a heatmap of that image. How would I create a
    PlotData()
    variable for a heatmap? The code below attempts this in two different ways, but neither attempt works
    Copy code
    julia
    # /dashboard.jl
    slice = rand(84, 84)
    image_viewer1 = PlotData(z=slice, plot="heatmap")
    image_viewer2 = PlotData(slice, plot="heatmap")
    
    # /ui.jl
    plot(:image_viewer)
    plot(:image_viewer2)
    Error 1:
    Copy code
    julia
    MethodError: no method matching (Vector)(::Matrix{Float64})
    Error 2:
    Copy code
    julia
    MethodError: no method matching StipplePlotly.Charts.PlotData(::Matrix{Float64}; plot="heatmap")
    p
    • 2
    • 1