diff --git a/python/lammps/__init__.py b/python/lammps/__init__.py index 3e538d3e49..a51e0db207 100644 --- a/python/lammps/__init__.py +++ b/python/lammps/__init__.py @@ -29,14 +29,16 @@ def get_version_number(): try: vstring = version('lammps') except: - vstring = None + # nothing to do, ignore + pass else: from pkg_resources import get_distribution try: vstring = get_distribution('lammps').version except: - vstring = None + # nothing to do, ignore + pass if not vstring: return 0 diff --git a/python/lammps/core.py b/python/lammps/core.py index 1a8f62094b..c4d5bff591 100644 --- a/python/lammps/core.py +++ b/python/lammps/core.py @@ -778,6 +778,8 @@ class lammps(object): elif dtype == LAMMPS_STRING: self.lib.lammps_extract_global.restype = c_char_p target_type = str + else: + target_type = None ptr = self.lib.lammps_extract_global(self.lmp, name) if ptr: