stevengiacalone / triceratops

Tool for Rating Interesting Candidate Exoplanets and Reliability Analysis of Transits Originating from Proximate Stars
https://triceratops.readthedocs.io
MIT License
20 stars 7 forks source link

calc_probs() raissed HTTP 400 Error from trilegal if the target instance is used for a long time #19

Closed orionlee closed 1 year ago

orionlee commented 1 year ago

Scenario:

Error:

HTTPError                                 Traceback (most recent call last)
File <timed exec>:9

File ~/dev/triceratops/triceratops/triceratops.py:706, in target.calc_probs(self, time, flux_0, flux_err_0, P_orb, contrast_curve_file, filt, N, parallel, drop_scenario, verbose, flatpriors, exptime, nsamples, molusc_file)
    704 if self.trilegal_fname is None: 
    705     output_url = self.trilegal_url
--> 706     trilegal_fname = save_trilegal(output_url, self.ID)
    707 else:
    708     trilegal_fname = self.trilegal_fname

File ~/dev/triceratops/triceratops/funcs.py:306, in save_trilegal(output_url, ID)
    304 else:
    305     for i in range(1000):
--> 306         last = read_csv(output_url, header=None)[-1:]
    307         if last.values[0, 0] != "#TRILEGAL normally terminated":
    308             print("...")

...

File /usr/lib/python3.8/urllib/request.py:649, in HTTPDefaultErrorHandler.http_error_default(self, req, fp, code, msg, hdrs)
    648 def http_error_default(self, req, fp, code, msg, hdrs):
--> 649     raise HTTPError(req.full_url, code, msg, hdrs, fp)

HTTPError: HTTP Error 404: Not Found