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

Error when skipping URL update #26

Closed
saberraz opened this issue Nov 7, 2023 · 4 comments · Fixed by #33
Closed

Error when skipping URL update #26

saberraz opened this issue Nov 7, 2023 · 4 comments · Fixed by #33
Labels
bug Something isn't working

Comments

@saberraz
Copy link
Contributor

saberraz commented Nov 7, 2023

When I skip URL updates by removing the references section from the config file, i.e. lines 26-30 in
https://github.com/MerginMaps/mergin-media-sync/blob/main/config.yaml.default

I get the following error:
Silent ignoring references section if not contained in config file.

@wonder-sk wonder-sk added the bug Something isn't working label Nov 24, 2023
@rastermanden
Copy link

This is not correct.

We would like the service to not throw an error if the "references" section is missing form config.yaml.

At the moment it works and copies/moves files but throws an error if the references section is not present. It would be nice not to have this error in logfiles

@rastermanden
Copy link

This is related to #20

We want to entirely skip updating references in a table and just copy to a bucket

docker stop mergin-media-sync
docker rm  mergin-media-sync
docker run -it \
  -v /tmp/mediasync:/data \
  --name mergin-media-sync \
  -e MERGIN__USERNAME=admin \
  -e MERGIN__URL=https://myrurl\
  -e MERGIN__PASSWORD=septima4you \
  -e MERGIN__PROJECT_NAME=myuser/media-syn-test \
  -e LOCAL__DEST=/data \
  -e OPERATION_MODE=copy \
  -e DRIVER=minio \
  -e MINIO__ENDPOINT="s3.dualstack.eu-central-1.amazonaws.com" \
  -e MINIO__REGION=eu-central-1 \
  -e MINIO__ACCESS_KEY=XXXXX \
  -e MINIO__SECRET_KEY=XXXXX \
  -e MINIO__BUCKET=mergin-sync-test \
  -e MINIO__SECURE=1 \
  -e MINIO__BUCKET_SUBPATH=newtest \
  lutraconsulting/mergin-media-sync python3 media_sync_daemon.py

Fails with

Updating references ...
Error: SQLITE error: no such table: notes

@JanCaha JanCaha mentioned this issue Mar 20, 2024
@rastermanden
Copy link

It seems that with new version 0.4.0 you still have to add (e REFERENCES="[]" ) a reference section with an empty array. Otherwise it uses a defult confif with a "notes" table.

Error: SQLITE error: no such table: notes

@JanCaha
Copy link
Collaborator

JanCaha commented Apr 5, 2024

I can quite see how this would happen, unless the specification is somewhere in the config.yaml. There are explicit checks that replace setup references as [] if the references are missing from the config file or if it does not have value at all. The default yaml file is not read anywhere in the media sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants