v1.0 - Version stable: multi-PC, détection UI-DETR-1, 3 modes exécution
- Frontend v4 accessible sur réseau local (192.168.1.40) - Ports ouverts: 3002 (frontend), 5001 (backend), 5004 (dashboard) - Ollama GPU fonctionnel - Self-healing interactif - Dashboard confiance Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
121
test_real_upload_fixed.py
Normal file
121
test_real_upload_fixed.py
Normal file
@@ -0,0 +1,121 @@
|
||||
") issuesing or other runnt ber may noerveailed - sad test f Uplo\n❌("rint:
|
||||
p elserver.")
|
||||
ith the se-to-end wnow work endoads Agent upl print("")
|
||||
esolved!as been re htch issumismayption key "The encrt( prin
|
||||
CESSFUL!")SUC TEST EAL UPLOAD\n🎉 Rt(" prin:
|
||||
ultif res
|
||||
|
||||
d_fixed()t_real_uploasult = tes re)
|
||||
|
||||
.."ryption fix.th enc wiuploadl ting rearint("Tes p":
|
||||
in__"__ma_name__ ==
|
||||
if _e
|
||||
|
||||
rn Falsetu r r: {e}")
|
||||
Upload errot(f"❌in pr as e:
|
||||
ception Ex except
|
||||
alse
|
||||
urn F ret }")
|
||||
.text[:500]ed: {resp Upload failt(f"❌ prin :
|
||||
else
|
||||
return True ")
|
||||
t[:200]}).tex{respe: (responsssful ad succe Uplo"✅ print(f cept:
|
||||
ex True
|
||||
return ")
|
||||
er')}et('usnse_data.g {respo" User:f print( }")
|
||||
ount')_censhotset('screta.gonse_dahots: {respScreens" print(f ")
|
||||
)}t's_couna.get('eventsponse_datents: {reEvt(f" prin ")
|
||||
n_id')}sessioget('_data.: {response IDsion" Sesrint(f p )
|
||||
ccessful!"pload suf"✅ U print(
|
||||
json()sp.data = rense_ respo ry:
|
||||
t
|
||||
= 200:code =p.status_ if res
|
||||
)
|
||||
s_code}"tatuHTTP {resp.sd response: int(f"Uploa pr
|
||||
=30)
|
||||
meoutdata, tifiles, data=iles=r_url, fs.post(servestresp = reque
|
||||
disabledce auth is headers sinuth # No a
|
||||
|
||||
}
|
||||
sion_id,n.sesssioest_se ton_id": "sessi
|
||||
= {ata d
|
||||
}
|
||||
stream"),/octet-icationf, "appl (filename, file": " s = {
|
||||
ile f
|
||||
p_path)ename(zis.path.basilename = o f
|
||||
as f: "rb") p_path,zith open( wi
|
||||
try:ver
|
||||
erload to s # Up
|
||||
|
||||
h}")zip_pat file: {ryptedated enc(f"Crerint p )
|
||||
WORD
|
||||
ASSTION_Pses ENCRYPone -> uword") # Nn_pass"encryptioget(=config. password e),
|
||||
, Truryption"ncable_e"enonfig.get(yption=cencre_ enabldir,
|
||||
se_dir=tmp ba,
|
||||
_sessiontest (
|
||||
ptionith_encryn_zip_wssioate_se= crepath p_
|
||||
zintioed encrypix with fed ZIPate encrypt # Cre
|
||||
dir)
|
||||
n(tmp.save_jsossiontest_se e session
|
||||
ave th S
|
||||
#dir:() as tmprectoryyDiarpfile.Tempor with tem
|
||||
|
||||
)
|
||||
0, 1080]n=[192en_resolutio scre
|
||||
st_host","tee=tnam
|
||||
hos"linux", rm= platfo d",
|
||||
_upload_fixest_realid="ter_ use te(
|
||||
rean.c RawSessiost_session = te
|
||||
onest sessi t # Create)
|
||||
|
||||
)}"ption'cryable_enen('get={config.ncryptionle_e}, enabssword')ption_paencryonfig.get('_password={cptioncryt config: en(f"Agenprint _config()
|
||||
_usernfig = loadfig
|
||||
co agent con # Load
|
||||
")
|
||||
==n =ed Encryptioh Fixd witg Real Uploa= Testin== print("
|
||||
|
||||
_user_configort loadmpser_config ient_v0.u agomfr
|
||||
nRawSessiort impo_session ent_v0.raw ag fromyption
|
||||
ncr_with_esion_zipte_sesrt creaimpopted orage_encryent_v0.stom ag fr
|
||||
rn False
|
||||
retu
|
||||
")ver: {e}each serot rf"❌ Cann print( :
|
||||
ception as e except Ex}")
|
||||
atus_urlat {stunning erver is r(f"✅ S printse
|
||||
urn Fal ret
|
||||
")s_url}at {statuding onver not resp Sert(f"❌ prin200:
|
||||
!= e ods_c resp.statu ift=5)
|
||||
timeoustatus_url,quests.get(= reresp
|
||||
atus")/st"/upload", place("_url.re = server_url status try:
|
||||
|
||||
|
||||
s/upload")ace:8000/api/tr/127.0.0.1", "http:/_URLERVERRPA_Snv("os.geteer_url =
|
||||
servis runningk if server
|
||||
# Chec
|
||||
tion."""encrypxed th fier wirv to seploadtual HTTP ust ac"""Te
|
||||
ixed():al_upload_f test_ret))
|
||||
|
||||
defile__).paren(Path(__ftrinsert(0, sys.path.0"))
|
||||
s_vnt / "agent__).pare(Path(__filetr(0, sinsertpath.ths
|
||||
sys.paAdd p()
|
||||
|
||||
# .strilue = vay.strip()]nviron[kes.e o =', 1)
|
||||
t('line.spli value = key, ne:
|
||||
in lid '='('#') anwith line.starts not line and if ()
|
||||
.stripnee = li lin f:
|
||||
inr line foas f:
|
||||
') th, 'rlocal_papen(env_th os():
|
||||
wipath.existcal_env_lo
|
||||
if )"ocal".env.lth(= Pacal_path
|
||||
env_loonment envir
|
||||
|
||||
# Loadimport Pathathlib ts
|
||||
from prt reques
|
||||
impolepfiimport temimport sys
|
||||
os
|
||||
port """
|
||||
|
||||
imn fix.
|
||||
he encryptioith tr wrveload to sest real up"
|
||||
Ten3
|
||||
""nv pytho/er/bin!/us#
|
||||
Reference in New Issue
Block a user