Shaun
Shaun
system dependencies aren't needed for 90% of the work.
George
Arjun
In model I have
profile_pic = ImageField(<path to s3 bucket>)
This is the only thing we are setting.
And yes, I’m also passing the binary object to the backend from the browser.
The object automatically gets uploaded to s3 but for webp the wrong content type is set.
Anders (izzno / gooood) 🇳🇴
Reverse?
Anders (izzno / gooood) 🇳🇴
I was on my cell but did you make sure "def get_absolute_url" is correct
George
hi, i'm in a crisis now
George
i got an imagefield whose value is undefined
Mirco
Share the code 😀
George
Well, mmm i dont get what specifically to share
George
I what case would i get undefined in an imagefield?
George
I looked the entry in dbeaver and all images where ok (the path) and only one got undefined
Mirco
How do you call it ? Undefined from js ?
George
No
George
Undefined in postgres
Mirco
Ah ok, strange
George
Mmmm
Mirco
Try to debug with pdb ( breakpoint() with py3.7)
George
George
hmmm
Mirco
Yes , Python debugger
cj
pdb?
are you using any IDE?
George
emacs
cj
emacs
maybe you can integrate it with breakpoint(), idk
George
yes, i know there is a debugger but i havent used it
cj
George
the thing is the problem is on database
George
i can't reproduce
Mirco
George
mmmmm
George
the thing is i don't know the images involved
George
and im fucked up
George
Mirco
You wrote that piece of code, you should know the flow 😂
cj
what do you mean?
use the debugger in the POST function, where the variable gets its value, then follow the flow and you will see magic
George
Mirco
Yep ahah and I love that py3.7 wraps pdb set trace with breakpoint()
George
yes but, i don't think i will help me
cj
George
ok, im gonna explain
cj
George
i got a image upload field, then i just save it to imagefield into my media folder but i got undefined
George
the thing is i don't know the image that caused the undefined
cj
Mirco
George
but what should i debug
George
i don't get it
cj
George
your code
my code is correct, it works
Mirco
cj
George
otherwise i don't know how to test it because if i got 1 failure in 600
cj
George
and it's not guaranteed to fail when i find the image involved
cj
Mirco
Of course 😂
George
i don't know how to do the debugging fk
George
because the saving process was done not by me
George
it was my client
George
how do you suggest for me to do the debug process?
George
NO
George
i mean the actual testing process
George
i can learn the debugger but im thinking my actual problem
George
do i get just random images and test them?
cj
George
yes ugh
George
but i need to fix first my actual problem
cj
or automate testing using selenium or similar
George
later i will do sth related
cj
yes ugh
that means you don't write unit test while you code? 😱
George