Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: runtime error: invalid memory address or nil pointer dereference #30

Closed
drsood opened this issue Jan 13, 2022 · 1 comment
Closed

Comments

@drsood
Copy link

drsood commented Jan 13, 2022

Hi. I am new to seekerr (seekerr v1.0.4 linux/amd64) and docker (running on Windows 11 64 bit). I am aware this error has been reported before. As the thread is closed, I am opening up a new one.

I am getting this error

seekerr import
Using config file: /config/seekerr.yaml
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x81bf1a]

goroutine 1 [running]:
github.com/spf13/viper.(*Viper).find(0x0, 0xac8239, 0x5, 0x1, 0x8c3ae5, 0xa068e0)
        /go/pkg/mod/github.com/spf13/viper@v1.9.0/viper.go:1165 +0x3a
github.com/spf13/viper.(*Viper).Get(0x0, 0xac8239, 0x5, 0xbab038, 0x1141f00)
        /go/pkg/mod/github.com/spf13/viper@v1.9.0/viper.go:838 +0x85
github.com/spf13/viper.(*Viper).GetBool(0x0, 0xac8239, 0x5, 0xc000001b00)
        /go/pkg/mod/github.com/spf13/viper@v1.9.0/viper.go:912 +0x3f
github.com/lightglitch/seekerr/utils/http.GetRestyClient(0x0, 0xad023e)
        /go/src/github.com/lightglitch/seekerr/utils/http/resty.go:52 +0x52
github.com/lightglitch/seekerr/cmd.glob..func4(0xf722e0, 0x1142178, 0x0, 0x0)
        /go/src/github.com/lightglitch/seekerr/cmd/import.go:59 +0x79
github.com/spf13/cobra.(*Command).execute(0xf722e0, 0x1142178, 0x0, 0x0, 0xf722e0, 0x1142178)
        /go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:860 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xf727e0, 0xc000000180, 0x200000003, 0xc000000180)
        /go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:974 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
        /go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:902
github.com/lightglitch/seekerr/cmd.Execute()
        /go/src/github.com/lightglitch/seekerr/cmd/root.go:50 +0x31
main.main()
        /go/src/github.com/lightglitch/seekerr/main.go:27 +0x25

My config file:

logger:
  level: debug  # panic,fatal,error,warn,info,debug,trace
  timeFormat: "" # golang time format
  color: true # active color on console
  human: true # store file log as human readable
  file: "var/log/seekerr.%Y%m%d.log" # %Y%m%d is used for rotation. leave empty to disable file log

cron: "0 */2 * * *"

services:

  trakt:
    apiKey: "xyz"

  omdb:
    apiKey: "xyz"

  radarr:
    url: "http://127.0.0.1:7878/"
    apiKey: "xyz"
    rootFolder: "/movies/"
    quality: "Bluray"
    minimumAvailability: "released"
    monitored: true
    searchForMovie: false

importer:
  revision: false
  filter:
    limit: 100 # limit the movies to process on each list
    exclude:
      - 'CountRatings < 2 || Runtime < 20 || ImdbVotes < 1000 || Year > Now().Year()'
      - 'Ratings.Imdb != 0 && Ratings.Imdb < 7'
    revision:
      - 'CountRatings < 2 || Runtime < 20 || ImdbVotes < 1000 || Year > Now().Year()'
      - 'Ratings.Imdb != 0 && Ratings.Imdb < 6.5'
      - 'Ratings.Metacritic != 0 && Ratings.Metacritic < 60'
      - 'Ratings.RottenTomatoes != 0 && Ratings.RottenTomatoes < 65'

  lists:
    
    traktPublic:
      type: "trakt" # rss | trakt | imdb
      url: "https://trakt.tv/users/fresnobiker/lists/new-hd-releases?sort=added,asc"
      
    traktPublic:
      type: "trakt" # rss | trakt | imdb
      url: "https://trakt.tv/users/giladg/lists/latest-releases?sort=added,asc"

Please help me with the issue.

@lightglitch
Copy link
Owner

Your problem is different from the other issue. Your problem is because you don't have the configuration for resty:

  resty:
    debug: false
    timeout: 20s
    retry: 0
    retryWaitTime: 1s
    retryMaxWaitTime: 10s

I will update to use default values if this service is not in the config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants