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
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py in _send_output(self, message_body, encode_chunked)
1025 del self._buffer[:]
-> 1026 self.send(msg)
1027
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py in send(self, data)
963 if self.auto_open:
--> 964 self.connect()
965 else:
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py in connect(self)
1399 self.sock = self._context.wrap_socket(self.sock,
-> 1400 server_hostname=server_hostname)
1401 if not self._context.check_hostname and self._check_hostname:
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py in do_handshake(self)
682 """Start the SSL/TLS handshake."""
--> 683 self._sslobj.do_handshake()
684 if self.context.check_hostname:
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ImagingReso/resonance.py in init(self, stack, energy_max, energy_min, energy_step, database)
90 if not stack == {}:
91 # checking that every element of each stack is defined
---> 92 _utilities.checking_stack(stack=stack, database=self.database)
93 new_stack = self.__update_stack_with_isotopes_infos(stack=stack)
94 self.stack = new_stack
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ImagingReso/_utilities.py in checking_stack(stack, database)
185 _elements = stack[_keys]['elements']
186 for _element in _elements:
--> 187 if not is_element_in_database(element=_element, database=database):
188 raise ValueError("Element {} can not be found in the database".format(_element))
189
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ImagingReso/_utilities.py in is_element_in_database(element, database)
157 return False
158
--> 159 list_entry_from_database = get_list_element_from_database(database=database)
160 if element in list_entry_from_database:
161 return True
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ImagingReso/_utilities.py in get_list_element_from_database(database)
94 print("First time using database '{}'? ".format(database))
95 print("I will retrieve and store a local copy of database'{}': ".format(database))
---> 96 download_from_github(fname=database + '.zip', path=_ref_data_folder)
97
98 # if '/_elements_list.csv' NOT exist
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ImagingReso/_utilities.py in download_from_github(fname, path)
33 url = base_url + f
34 block_size = 16384
---> 35 req = urlopen(url)
36
37 # Get file size from header
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py in _open(self, req, data)
542 protocol = req.type
543 result = self._call_chain(self.handle_open, protocol, protocol +
--> 544 '_open', req)
545 if result:
546 return result
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args)
502 for handler in handlers:
503 func = getattr(handler, meth_name)
--> 504 result = func(*args)
505 if result is not None:
506 return result
@ustajan I just tried and failed to reproduce the error. It seems to be a connection issue. Due to the size of ENDF database, this package can not carry them with each release, this step is simply downloading the database from this git repo. You can download them at here (ENDF/B-VII, ENDF/B-VIII).
And then move them to ./ImagingReso/reference_data/.
Trying to use Method 1 from the tutorial from here. Looks like some server connection issue:
o_reso = Resonance(stack=_stack, energy_min=_energy_min, energy_max=_energy_max, energy_step=_energy_step)
The text was updated successfully, but these errors were encountered: