Message from Python discussions

December 2018

— Jieba tokenizer

— 

Ok, i got an strange problem
the name of a file is shortened if it has an underscore
https://hastebin.com/jonuyozida.py

— It seems that after the underscore there is an id, the thing is that it's not into the name :/

— 

>>>a=tempfile.NamedTemporaryFile(delete=False)
>>> a.name
'/tmp/tmp9kfrt2lb'
>>> import os
>>> os.path.getsize(a.name)
0

Message permanent page

— Maybe your image.name treated as filename prefix?

— Mmmmmm

— I put a deliberate prefix .jpg like right now

— Its strange because i did just an example in shell and everything was fine but i dont understand what happens in my view

Message permanent page

— What should i do then

— Idk, idk django as well, but from my perspective you can find file that starts with image.name and rename it with os.rename()

Message permanent page

— That is fucky

— I mean, that is not a really good solution