相关疑难解决方法(0)

如何修复Python中的"<string> DeprecationWarning:无效转义序列"?

我在Python中收到很多这样的警告:

DeprecationWarning: invalid escape sequence \A
  orcid_regex = '\A[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{3}[0-9X]\Z'

DeprecationWarning: invalid escape sequence \/
  AUTH_TOKEN_PATH_PATTERN = '^\/api\/groups'

DeprecationWarning: invalid escape sequence \
  """

DeprecationWarning: invalid escape sequence \.
  DOI_PATTERN = re.compile('(https?://(dx\.)?doi\.org/)?10\.[0-9]{4,}[.0-9]*/.*')

<unknown>:20: DeprecationWarning: invalid escape sequence \(

<unknown>:21: DeprecationWarning: invalid escape sequence \(
Run Code Online (Sandbox Code Playgroud)

他们的意思是什么?我该如何解决它们?

python python-3.x python-3.6

21
推荐指数
1
解决办法
7853
查看次数

标签 统计

python ×1

python-3.6 ×1

python-3.x ×1