You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
change "Open Membership" setting to false in admin panel
create backup file as indicated in docs: docker-compose run --rm -T -e SENTRY_LOG_LEVEL=CRITICAL web export > sentry/backup.json
docker compose down
docker volume rm $(docker volume ls -q)
./install.sh
Restore backup docker-compose run --rm -T web import /etc/sentry/backup.json
Expected Result
Backup is restored successfully
Actual Result
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/django/core/serializers/python.py", line 143, in Deserializer
data[field.name] = field.to_python(field_value)
File "/usr/local/lib/python3.8/site-packages/sentry/db/models/fields/picklefield.py", line 54, in to_python
return json.loads(value)
File "/usr/local/lib/python3.8/site-packages/sentry/utils/json.py", line 114, in loads
return _default_decoder.decode(value)
File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 392, in raw_decode
raise TypeError("Input string must be text, not bytes")
TypeError: Input string must be text, not bytes
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/sentry", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/sentry/runner/__init__.py", line 188, in main
func(**kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/sentry/runner/decorators.py", line 29, in inner
return ctx.invoke(f, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/sentry/runner/commands/backup.py", line 19, in import_
for obj in serializers.deserialize("json", src, stream=True, use_natural_keys=True):
File "/usr/local/lib/python3.8/site-packages/django/core/serializers/json.py", line 69, in Deserializer
yield from PythonDeserializer(objects, **options)
File "/usr/local/lib/python3.8/site-packages/django/core/serializers/python.py", line 145, in Deserializer
raise base.DeserializationError.WithData(e, d['model'], d.get('pk'), field_value)
django.core.serializers.base.DeserializationError: Input string must be text, not bytes: (sentry.option:pk=5) field_value was 'False'
To fix it, I had to manually patch the JSON
{
"model": "sentry.option",
"pk": 5,
"fields": {
"key": "auth.allow-registration",
- "value": false,+ "value": "false",
"last_updated": "2022-07-13T11:31:28.985Z"
}
},
This issue happened for multiple objects that are of number or boolean type. Wrapping in quotes worked in all instances.
The text was updated successfully, but these errors were encountered:
Self-Hosted Version
22.7.0
CPU Architecture
x86_64
Docker Version
20.10.17
Docker Compose Version
2.6.0
Steps to Reproduce
docker-compose run --rm -T -e SENTRY_LOG_LEVEL=CRITICAL web export > sentry/backup.json
docker compose down
docker volume rm $(docker volume ls -q)
./install.sh
docker-compose run --rm -T web import /etc/sentry/backup.json
Expected Result
Backup is restored successfully
Actual Result
To fix it, I had to manually patch the JSON
The text was updated successfully, but these errors were encountered: