malaow3 / Glucose-Widget

13 stars 6 forks source link

Font issue #4

Closed badgerisop closed 2 years ago

badgerisop commented 3 years ago

Tried setting this up today and ran into this error when running it for the first time. Any fix for this?

/go/pkg/mod/gonum.org/v1/plot@v0.8.1/text/latex.go:36:3: cannot use fnt.Font() (type truetype.Font) as type sfnt.Font in field value ../go/pkg/mod/gonum.org/v1/plot@v0.8.1/text/latex.go:37:3: cannot use fnt.Font() (type truetype.Font) as type sfnt.Font in field value ../go/pkg/mod/gonum.org/v1/plot@v0.8.1/text/latex.go:38:3: cannot use fnt.Font() (type truetype.Font) as type sfnt.Font in field value ../go/pkg/mod/gonum.org/v1/plot@v0.8.1/text/latex.go:64:3: cannot use sty.Font.Font() (type truetype.Font) as type sfnt.Font in field value ../go/pkg/mod/gonum.org/v1/plot@v0.8.1/text/latex.go:65:3: cannot use sty.Font.Font() (type truetype.Font) as type sfnt.Font in field value ../go/pkg/mod/gonum.org/v1/plot@v0.8.1/text/latex.go:66:3: cannot use sty.Font.Font() (type truetype.Font) as type sfnt.Font in field value

malaow3 commented 3 years ago

Hey there, just to confirm you copied the relevant files into a repl? If that's the case, my suggestion is to delete the go.mod and go.sum files (as I believe there is a small error in them at the moment) and on a re-run they will be automatically generated by repl

badgerisop commented 3 years ago

Deleted both but now it says this when I try to run it: go: cannot find main module; see 'go help modules' compiler exit status 1

malaow3 commented 3 years ago

Ah ok, try copying the following into the go.mod file then:

module main

go 1.14

require (
    github.com/gin-gonic/gin v1.6.3
    github.com/joho/godotenv v1.3.0
    gonum.org/v1/plot v0.8.1
)

It might take a while to download everything, but that's just a consequence of using someone else's server to run code as opposed to running it locally on your own machine.

badgerisop commented 3 years ago

That worked. Thanks!

badgerisop commented 3 years ago

Okay, it seems like it only works when I have it actively up and running on my PC.

What am I missing?

On Tue, Mar 9, 2021 at 12:53 PM malaow3 notifications@github.com wrote:

Ah ok, try copying the following into the go.mod file then:

module main

go 1.14

require ( github.com/gin-gonic/gin v1.6.3 github.com/joho/godotenv v1.3.0 gonum.org/v1/plot v0.8.1 )

It might take a while to download everything, but that's just a consequence of using someone else's server to run code as opposed to running it locally on your own machine.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/malaow3/Glucose-Widget/issues/4#issuecomment-794231280, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEOVX453S6SABRZPNJMQ3QLTCZHB7ANCNFSM4Y35N67Q .

malaow3 commented 3 years ago

Unfortunately, a repl instance will shut down unless it is constantly being used... The way around that is to setup an account on a site (such as uptimerobot.com) and set it to ping your repl every 5 minutes or so, this way it will always be running, barring any outages or maintenance from repl.

badgerisop commented 3 years ago
I did set up Uptime Robot though. Set it up immediately.   Sent from Mail for Windows 10 From: malaow3Sent: Tuesday, March 9, 2021 8:39 PMTo: malaow3/Glucose-WidgetCc: bwclarke; AuthorSubject: Re: [malaow3/Glucose-Widget] Font issue (#4) Unfortunately, a repl instance will shut down unless it is constantly being used... The way around that is to setup an account on a site (such as uptimerobot.com) and set it to ping your repl every 5 minutes or so, this way it will always be running, barring any outages or maintenance from repl.—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe. 
malaow3 commented 3 years ago

If that's the case I would check to ensure the repl is running and hasn't been accidentally terminated. Sometimes it will just stop (can't particularly explain why) but since its hosted via repl you can log on w/ either your mobile device or laptop and restart it

badgerisop commented 3 years ago
Yeah, it’s weird. It just won’t stay up for long for some reason.   Sent from Mail for Windows 10 From: malaow3Sent: Tuesday, March 9, 2021 9:20 PMTo: malaow3/Glucose-WidgetCc: bwclarke; AuthorSubject: Re: [malaow3/Glucose-Widget] Font issue (#4) If that's the case I would check to ensure the repl is running and hasn't been accidentally terminated. Sometimes it will just stop (can't particularly explain why) but since its hosted via repl you can log on w/ either your mobile device or laptop and restart it—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.