You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a secure cluster that blocks data transfer unless it is authorized by the user. Recently I tried using sncosmo in a package called nmma and I get the error posted below. I tried circumventing this issue by manually including the bandpass data where my sncosmo installation lives. However it looks like sncosmo decides to look for the data via the url anyways. Is there I way I can tell sncosmo to look for the other filters located in /usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/site-packages/sncosmo/data/bandpasses and ignore the call outside the cluster?
I haven't had this issue before but I did just recreate a conda environment which includes installing the newest sncosmo. Is this a recent addition and my issue could be resolved by reverting to an older version?
Traceback (most recent call last):
File "/lustre/scratch5/.mdt0/bking/nmma/tools/generate_ztf_detectable.py", line 54, in <module>
lightcurve_file = generate_lightcurve(model=model, injection_path=injection_file, outDir=outdir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lustre/scratch5/.mdt0/bking/nmma/tools/lightcurves.py", line 84, in generate_lightcurve
create_lightcurves.main(args)
File "/usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/site-packages/nmma/em/create_lightcurves.py", line 340, in main
data = create_light_curve_data(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/site-packages/nmma/em/injection.py", line 123, in create_light_curve_data
lbol, mag = light_curve_model.generate_lightcurve(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/site-packages/nmma/em/model.py", line 371, in generate_lightcurve
_, lambdas = utils.get_default_filts_lambdas(filters=filts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/site-packages/nmma/em/utils.py", line 338, in get_default_filts_lambdas
bandpass = sncosmo.get_bandpass(val["name"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/site-packages/sncosmo/bandpasses.py", line 27, in get_bandpass
return _BANDPASSES.retrieve(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/site-packages/sncosmo/_registry.py", line 160, in retrieve
self._instances[key] = func(*args, name=name)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/site-packages/sncosmo/builtins.py", line 75, in load_bandpass_remote_aa
abspath = DATADIR.abspath(relpath)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/site-packages/sncosmo/utils.py", line 464, in abspath
url = self._get_url(relpath)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/site-packages/sncosmo/utils.py", line 434, in _get_url
self._fetch_redirects()
File "/usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/site-packages/sncosmo/utils.py", line 427, in _fetch_redirects
f = urlopen(self._remote_root + "redirects.json")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/urllib/request.py", line 519, in open
response = self._open(req, data)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/urllib/request.py", line 496, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "/usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/urllib/request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/urllib/request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error Tunnel connection failed: 403 Forbidden>
The text was updated successfully, but these errors were encountered:
Hello,
I am working on a secure cluster that blocks data transfer unless it is authorized by the user. Recently I tried using sncosmo in a package called nmma and I get the error posted below. I tried circumventing this issue by manually including the bandpass data where my sncosmo installation lives. However it looks like sncosmo decides to look for the data via the url anyways. Is there I way I can tell sncosmo to look for the other filters located in
/usr/projects/nsmergers/nmma_0p2p0/lib/python3.11/site-packages/sncosmo/data/bandpasses
and ignore the call outside the cluster?I haven't had this issue before but I did just recreate a conda environment which includes installing the newest sncosmo. Is this a recent addition and my issue could be resolved by reverting to an older version?
The text was updated successfully, but these errors were encountered: