aragagnin / g3read

Libraries and tools to read Gadget2, Gadget3 and Key files outputs and associated units of measurement

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with permanent redirects

jzuhone opened this issue · comments

I attempted to run the following command:

python c2pap_batch.py -u 'jzuhone@gmail.com' -f SGclusterList_124.csv -s SimCut -p r500factor=4 IMG_Z_SIZE=20000.0 -vvv

and I got the following error:

New job: j09sz42l7jxiqhv6.
Opening https://c2papcosmosim.uc.lrz.de/jobs
send: b'GET /jobs HTTP/1.1\r\nAccept-Encoding: gzip\r\nCookie: session=.eJxdkt2O2jAQhd_FV63UItuJScIdgu2WSoC27KolVRXZzjgBHJzayYof8e51CpvS5iY639hnju05o0xZcCUaNbaFDyjb5GiEQsFiFQaA2ZAMBacgIgGhjNiQChUpHgcxxlJghqVfwkIKLEqAJ3EYhliJbu8woDIP44BILJSkAeM5Y0QSJUAMecAoiTgRGPJE5BFmNFIgBOdSUpoEyAdpHdhrGkqGHkhnVdaYHew9CmROQRESY5IAA8q8jZRcREkUhypPopAFJMfM76tLc1DGVmh0RrP5Y5Zmq1n60Nli_w2wX8IPG_fdE20Kgt_NGcZZ5Ywu399q6772nO3gtcNyB3KXSWOqmssmK6xpa4dGimsHb9UKbAH2jurWNW-HihMSB0nnZLSxHpD_zzjbLrbp9ItOtw-H5XR8WH57IenzjKRTvVnTRbneSrY4FTitnvz_icxPn3bz6ctmsP4cs_14kLZf84S7-cqN09nq18Es24naPtqPbuxbFVxnJ7CmT1dyN7lGuQHNj2BXoEE2G7MnPlF3V_9Sek9dffThi0LDXw9THO7FsRfG5mCF1-j841wC9-ry84L6QmVyb4PGq0nHXsH6Fr37dVZrbZqsOdZwC2H9wyn_Gn-usxsZP9jQ9B3dpmo171KjEfFyz2tXGl-n7HL5DVWM9h4.YH85nQ.7q1OuyEIKSrjtlp894hRG2EWo3Y\r\nUser-Agent: Mozilla/5.0\r\nHost: c2papcosmosim.uc.lrz.de\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 308 PERMANENT REDIRECT\r\n'
header: Server: nginx/1.13.3
header: Date: Tue, 20 Apr 2021 20:29:18 GMT
header: Content-Type: text/html; charset=utf-8
header: Content-Length: 279
header: Connection: close
header: Location: http://c2papcosmosim.uc.lrz.de/jobs/
header: Vary: Cookie
Traceback (most recent call last):
  File "/Volumes/scratch6/jzuhone/magneticum/c2pap_batch.py", line 691, in <module>
    main()
  File "/Volumes/scratch6/jzuhone/magneticum/c2pap_batch.py", line 682, in main
    wait(br, found_job)
  File "/Volumes/scratch6/jzuhone/magneticum/c2pap_batch.py", line 149, in wait
    res = dec(br.open(BASE+"/jobs"))
  File "/Volumes/scratch6/jzuhone/magneticum/c2pap_batch.py", line 378, in open
    return mechanize.Browser.open(br, page)
  File "/Users/jzuhone/miniconda3/envs/py39/lib/python3.9/site-packages/mechanize/_mechanize.py", line 257, in open
    return self._mech_open(url_or_request, data, timeout=timeout)
  File "/Users/jzuhone/miniconda3/envs/py39/lib/python3.9/site-packages/mechanize/_mechanize.py", line 313, in _mech_open
    raise response
mechanize._response.httperror_seek_wrapper: HTTP Error 308: PERMANENT REDIRECT

I think the website changed recently?

Yes the website changed. Unfortunately we are upgrading the server from py2 to py3.

I tried to make fix this issue.
Please let me know if it works. now

Also feel free to reply to my personal address antonio.ragagnin at inaf.it with more details if you want.

I edited the c2pap_batch.py file in order to deal with the 308 HTTP reply.

Please try the new version in the repository and let me know if the issue is still there

@aragagnin yes, this is fixed now--thank you!