Skip to content

error: no such table: _collections (1) at reflect.methodValueCall (native) #3

@franklili3

Description

@franklili3

OS: Linux
My pocketbase instance root directory: ~/project/go/src/github.com/franklili3/pocketbase/examples/base
My pocketbase instance data directory: /var/data
render@srv-cqaarcbv2p9s73ctkgeg-7fb4fdc7d6-sk6fj:/var/data$ cp -r pb-import/pb_hooks ~/project/go/src/github.com/franklili3/pocketbase/examples/base
run:
render@srv-cqaarcbv2p9s73ctkgeg-7fb4fdc7d6-sk6fj:/var/data/pb-import$ ~/project/go/src/github.com/franklili3/pocketbase/examples/base/base import_csv cn_stock_portfolio_cumulated_returns_month_all.csv cn_stock_portfolio_cumulated_returns_month
error:

2024/10/28 22:05:49 parsing file...cn_stock_portfolio_cumulated_returns_month_all.csv
2024/10/28 22:06:14 determining field types for cn_stock_portfolio_cumulated_returns_month...
2024/10/28 22:07:05 creating collection cn_stock_portfolio_cumulated_returns_month...
panic: GoError: SQL logic error: no such table: _collections (1) at reflect.methodValueCall (native)

goroutine 52 [running]:
github.com/dop251/goja.(*Runtime).toReflectValue.(*Runtime).wrapJSFunc.func1({0xc0009eb1a0?, 0x2?, 0x4?})
        /opt/render/project/go/pkg/mod/github.com/dop251/[email protected]/runtime.go:2255 +0x734
github.com/spf13/cobra.(*Command).execute(0xc0006cb508, {0xc0007c2e40, 0x2, 0x2})
        /opt/render/project/go/pkg/mod/github.com/spf13/[email protected]/command.go:989 +0xab1
github.com/spf13/cobra.(*Command).ExecuteC(0xc0006cac08)
        /opt/render/project/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
        /opt/render/project/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041
github.com/pocketbase/pocketbase.(*PocketBase).Execute.func2()
        /opt/render/project/go/src/github.com/franklili3/pocketbase/pocketbase.go:170 +0x25
created by github.com/pocketbase/pocketbase.(*PocketBase).Execute in goroutine 1
        /opt/render/project/go/src/github.com/franklili3/pocketbase/pocketbase.go:168 +0xe9

But it works when data directory is pb_data(default), So maybe this repo does not support other data dir. How can I do?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions