2

So I tried looking for some answer eg(here,here and here) but the solutions don't make any sense. I am sending bytes to Celery. and for some reason it tells me that it's JSON-serializable while I am not even using JSON

write_file_aws.delay(file_full_name, file_to_put) #file_fill_name - str type, file_to_put - bytes type

and there I have the error I tried also decoding it but I had this problem

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe6 in position 113: invalid continuation byte

so I tried this solution and just another error. Why can't I send a byte-type variable to celery? Is that something impossible to send to a celery function?

backend framework- Flask.

1 Answer 1

2

The simple answer is that you just can't pass a byte type variable to a Celery function. If you have to you can turn it to a list save it in a database then call it inside the function. Or encode it to base64 and then in thr function decode it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.