Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Runtime error #330

Open
cbolanos79 opened this issue Dec 22, 2020 · 2 comments
Open

Runtime error #330

cbolanos79 opened this issue Dec 22, 2020 · 2 comments

Comments

@cbolanos79
Copy link

I tried a simple example but got an error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x696ec8]

goroutine 1 [running]:
gopkg.in/ahmdrz/goinsta%2ev2.(*Instagram).Export(0xc00013e000, 0x728090, 0xa, 0x0, 0xc00013e000)
	/go/src/gopkg.in/ahmdrz/goinsta.v2/goinsta.go:191 +0xc8
main.main()
	/home/go/main.go:16 +0x65
exit status 2

source code:

package main

import (
  //"fmt"

  "gopkg.in/ahmdrz/goinsta.v2"
)

func main() {
  insta := goinsta.New("myuser", "")

  // Export your configuration
  // after exporting you can use Import function instead of New function.
  // insta, err := goinsta.Import("~/.goinsta")
  // it's useful when you want use goinsta repeatedly.
  insta.Export("~/.goinsta")

  //...
}

Using golang on docker
Go version:

root@f4d5f0d22daf:/home/go# go version
go version go1.15.6 linux/amd64
@renanberto
Copy link

Hello dude, I found this error and fix with it:

package main

import (
	"fmt"

	"github.com/ahmdrz/goinsta/v2"
)

func main() {
	insta := goinsta.New("USER", "PASSWORD")

	if err := insta.Login(); err != nil {
		fmt.Println(err)
	}

	insta.Export("~/.goinsta")
}

@alimkoca
Copy link

Thanks worked for me

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

No branches or pull requests

3 participants