ronoaldo / aetools

Utilities to build and manage Google App Engine apps
Apache License 2.0
19 stars 2 forks source link

aeremote #9

Closed dolefir closed 4 years ago

dolefir commented 5 years ago

//question Hello @ronoaldo! How to use aeremote if in bash file error aeremote: command not found?

ronoaldo commented 5 years ago

Hi @simplewayua. You can install it using the Go compiler toolchain:

go get ronoaldo.gopkg.net/aetools/aeremote

Requires Go 1.7+. The go get command will put the aeremote binary in your $GOPATH/bin folder, just make sure to add the $GOPATH/bin folder into your own system $PATH.

Alternatively, you can get the program and afterwards, build the binary manually with go build.

dolefir commented 5 years ago

Hi @ronoaldo. Yes, thanks. $GOPATH/bin wasn't specified

dolefir commented 5 years ago

Hey, @ronoaldo what I set up is not so that on the output I get?

for fixture in fixtures/*.json ; do \
aeremote --port=8888 -load $fixture ; \
done
2019/07/23 17:56:38 Connecting with localhost:8888 ...
2019/07/23 17:56:38 Using a local connection ...
2019/07/23 17:56:39 Loading entities ...
2019/07/23 17:56:39 Error loading fixture fixtures/LandingPage.json: API error 1 (datastore_v3: BAD_REQUEST): app "dev~None" cannot access app "dev~"'s data
2019/07/23 17:56:39 Connecting with localhost:8888 ...
2019/07/23 17:56:39 Using a local connection ...
2019/07/23 17:56:39 Loading entities ...
2019/07/23 17:56:39 Error loading fixture fixtures/Listing.json: API error 1 (datastore_v3: BAD_REQUEST): app "dev~None" cannot access app "dev~"'s data
2019/07/23 17:56:39 Connecting with localhost:8888 ...
2019/07/23 17:56:39 Using a local connection ...
2019/07/23 17:56:39 Loading entities ...
2019/07/23 17:56:39 Error loading fixture fixtures/Page.json: API error 1 (datastore_v3: BAD_REQUEST): app "dev~None" cannot access app "dev~"'s data
2019/07/23 17:56:39 Connecting with localhost:8888 ...
2019/07/23 17:56:39 Using a local connection ...
2019/07/23 17:56:39 Loading entities ...
2019/07/23 17:56:39 Error loading fixture fixtures/Site.json: API error 1 (datastore_v3: BAD_REQUEST): app "dev~None" cannot access app "dev~"'s data
curl -Ss http://localhost:8888/_tasks/index-breeds/
OK%

the essence of the error: API error 1 (datastore_v3: BAD_REQUEST): app "dev~None" cannot access app "dev~"'s data

ronoaldo commented 5 years ago

Hey! Can you show me a sample of the fixtures you are trying to load? The error seems to be related to string encoded keys.

dolefir commented 5 years ago

@ronoaldo example fixtures JSON

https://gist.github.com/simplewayua/d77c39b2b826ca87d66b75de75aeab36

alexshapalov commented 5 years ago

@ronoaldo Hi 👋

Any idea how to fix this?

best, Alex

ronoaldo commented 5 years ago

Hi @SashkaSh and @simplewayua !

When you run the development server localy, do you have any application: directive inn your app.yaml file? The sample json file should load without issues...

On a side note, Google is deprecating the Remote API backend, which my tool uses for importing and exporting the files. It is wise to move to another option, using Cloud Datastore API.