#2007·deepchem

Deprecation warning due to invalid escape sequences

Author: tirkarthiCreated Jul 14, 2020Updated Sep 17, 2026
Labelshelp wantedGood First ContributionContribution Welcome

Deprecation warnings are raised due to invalid escape sequences. This can be fixed by using raw strings or escaping the literals. pyupgrade also helps in automatic conversion : https://github.com/asottile/pyupgrade/

find . -iname '*.py' | grep -v example | xargs -P4 -I{} python3.8 -Wall -m py_compile {}     
./deepchem/feat/rdkit_grid_featurizer.py:31: DeprecationWarning: invalid escape sequence \e
  """Generate a random unit vector on the 3-sphere.
./deepchem/feat/rdkit_grid_featurizer.py:49: DeprecationWarning: invalid escape sequence \d
  """Generate a random rotation matrix in 3D.
./deepchem/models/layers.py:1761: DeprecationWarning: invalid escape sequence \s
  """
./deepchem/models/layers.py:1854: DeprecationWarning: invalid escape sequence \s
  """
./deepchem/utils/geometry_utils.py:41: DeprecationWarning: invalid escape sequence \e
  """Generate a random unit vector on the sphere S^2.
./deepchem/utils/geometry_utils.py:59: DeprecationWarning: invalid escape sequence \d
  """Generates a random rotation matrix.
./deepchem/molnet/load_function/pdbbind_datasets.py:206: DeprecationWarning: invalid escape sequence \.
  re.search("\.(.*)", str(time.time())).group(1))