-
Notifications
You must be signed in to change notification settings - Fork 4
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
Exits After "Querying Notion database" with no error message #10
Comments
It just says “Querying Notion database”? Or it says “❌ Querying Notion database: “? |
If it’s the first one, I don’t know how to test that and may need some more context. If it is the second one, the problem may be of the notion-api library. Anyways, there is a big pr open and things may change a lot so I wouldn’t worry much about current bugs. |
you can try the pr: https://github.com/saltbo/notion-md-gen/tree/fly welcome any feedback for me |
Hmm, the install doesn't work for me: $ brew install notion-md-gen
Running `brew update --preinstall`...
Warning: No available formula with the name "notion-md-gen".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps. |
it's not ready |
Allright, could you provide some instructions to compile it? |
you can exec 'go install .' in the project then exec '$GOPATH/bin/notion-md-gen' |
Hi @ganeshh123, I have discarded the idea of integrating the changes of the pull request so I can help you try to find a solution for this problem or you can choose the @saltbo repository which is a more generic generator. In case you want to keep with this project, I will need some more info about the problem as I don't know how to replicate it. Could you try to run it on another system or architecture with the same configuration? As I see that you are running it from WSL and it is known by having unexpected bugs. |
Thanks for your offer to help, lets try and figure it out. I need a solution for Hugo specifically, so this is more suitable for me. As per your suggestion, I tried building it for native Windows, but I get this error: C:\Code\notion-blog>go build -o ./bin/main cmd/main/main.go
# github.com/janeczku/go-spinner
C:\Users\ganesh\go\pkg\mod\github.com\janeczku\go-spinner@v0.0.0-20150530144529-cf8ef1d64394\spinner.go:39:25: cannot use syscall.Stdout (type syscall.Handle) as type int in argument to terminal.IsTerminal Maybe the Spinner module doesn't work on Windows? Anyway in the Linux build, this is my config: {
"databaseID": "723a5a8dc0e04461b75b58a50e490024",
"imagesLink": "",
"imagesFolder": "posts",
"contentFolder": "posts",
"propertyTags": "Tags",
} Some fields are missing as I don't yet have a blog, as I just want to see how the markdowns look, and I don't have a Description, or Status property for the pages. The database is public, so you can examine it yourself here: Is it mandatory to have the Status and Description properties on the pages? If so, can they be made optional? My .env file looks like this:
The token here has edit access to the database. Hope some of this info is useful, if you need anything else please let me know. |
The package github.com/janeczku/go-spinner seems that windows is not supported. I has replace it by github.com/briandowns/spinner |
As @saltbo mentioned,
The application is performing a filtered fetch from the database, but if no q, err := client.Database.Query(context.Background(), notionapi.DatabaseID(config.DatabaseID),
¬ionapi.DatabaseQueryRequest{
CompoundFilter: filterFromConfig(config), // <- will be nil
PageSize: 100,
}) So I'm not quite sure of what is going on here. |
Sorry for the delayed reply. I tried it with another database (https://ganeshh123.notion.site/3967580d3fb64cb4a4f0a9493ece6ed6) with very simple properties but its still having the same issues. I even tried adding the properties from the example config file, but I am still getting the same issue :( |
Just to make sure, did you create an integration and shared those databases to the integration? To create an integration, use the following link: https://www.notion.so/my-integrations I have it with the following permissions: On Notion, go to the database page. Then press Share button and make sure you shared the page with the integration you created. |
After compiling a binary and running, it shows the spinner with "Querying Notion database" and then just exits with no error message.
The text was updated successfully, but these errors were encountered: