在 Arelle 启动期间出现有关错误逃逸的错误
Getting error about bad escape during start of Arelle
我正在尝试让 Arelle 在 Ubuntu linux 18.04 和 Python 3.6.9.
上工作
第一步:(下载Arelle软件):
git 克隆 https://github.com/Arelle/Arelle.git -b lxml
第二步安装Python LXML:
apt-get install -y python-lxml
第三步安装Python tk:
由于错误:'No module named tkinter'
...我安装:
apt-get 安装 python3-tk
当需要从终端启动 Arelle 时,我使用:
python3 arelleGUI.pyw
然后我得到以下错误:
Traceback (most recent call last):
File "arelleGUI.pyw", line 9, in <module>
from arelle import CntlrWinMain
File "/tmp3/Arelle/arelle/CntlrWinMain.py", line 22, in <module>
from arelle import Cntlr
File "/tmp3/Arelle/arelle/Cntlr.py", line 8, in <module>
from arelle import ModelManager
File "/tmp3/Arelle/arelle/ModelManager.py", line 8, in <module>
from arelle import (ModelXbrl, Validate, DisclosureSystem)
File "/tmp3/Arelle/arelle/Validate.py", line 9, in <module>
from arelle import (ModelXbrl, ModelVersReport, XbrlConst, ModelDocument,
File "/tmp3/Arelle/arelle/ModelVersReport.py", line 9, in <module>
from arelle import (XbrlConst, XbrlUtil, XmlUtil, UrlUtil, ModelXbrl, ModelDocument, ModelVersObject)
File "/tmp3/Arelle/arelle/ModelDocument.py", line 9, in <module>
from arelle import (XbrlConst, XmlUtil, UrlUtil, ValidateFilingText, XmlValidate)
File "/tmp3/Arelle/arelle/ValidateFilingText.py", line 16, in <module>
docCheckPattern = re.compile(r"&\w+;|[^0-9A-Za-z`~!@#$%&\*\(\)\.\-+ \[\]\{\}\|\:;\"'<>,_?/=\t\n\r\m\f]") # won't match &#nnn;
File "/usr/lib/python3.6/re.py", line 233, in compile
return _compile(pattern, flags)
File "/usr/lib/python3.6/re.py", line 301, in _compile
p = sre_compile.compile(pattern, flags)
File "/usr/lib/python3.6/sre_compile.py", line 562, in compile
p = sre_parse.parse(p, flags)
File "/usr/lib/python3.6/sre_parse.py", line 855, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "/usr/lib/python3.6/sre_parse.py", line 416, in _parse_sub
not nested and not items))
File "/usr/lib/python3.6/sre_parse.py", line 527, in _parse
code1 = _class_escape(source, this)
File "/usr/lib/python3.6/sre_parse.py", line 336, in _class_escape
raise source.error('bad escape %s' % escape, len(escape))
sre_constants.error: bad escape \m at position 67
我发现这个 似乎与问题有关。
这是 Arelle 中的错误,出现在 Python 3.6 及更高版本中。有一个 pull request ,但仍然开放(自 2017 年 7 月起)。鉴于 Python 3.6 已经发布了很长一段时间,我不知道为什么还没有修复。
您正在使用 lxml
分支,该分支已 stale for 10 years。所以也许这个错误实际上已经在 master 分支上得到修复(即使拉取请求仍然打开),但在 lxml
分支上没有。如果您愿意,请先尝试从 master 安装。
我正在尝试让 Arelle 在 Ubuntu linux 18.04 和 Python 3.6.9.
上工作第一步:(下载Arelle软件):
git 克隆 https://github.com/Arelle/Arelle.git -b lxml
第二步安装Python LXML:
apt-get install -y python-lxml
第三步安装Python tk:
由于错误:'No module named tkinter'
...我安装:
apt-get 安装 python3-tk
当需要从终端启动 Arelle 时,我使用:
python3 arelleGUI.pyw
然后我得到以下错误:
Traceback (most recent call last):
File "arelleGUI.pyw", line 9, in <module>
from arelle import CntlrWinMain
File "/tmp3/Arelle/arelle/CntlrWinMain.py", line 22, in <module>
from arelle import Cntlr
File "/tmp3/Arelle/arelle/Cntlr.py", line 8, in <module>
from arelle import ModelManager
File "/tmp3/Arelle/arelle/ModelManager.py", line 8, in <module>
from arelle import (ModelXbrl, Validate, DisclosureSystem)
File "/tmp3/Arelle/arelle/Validate.py", line 9, in <module>
from arelle import (ModelXbrl, ModelVersReport, XbrlConst, ModelDocument,
File "/tmp3/Arelle/arelle/ModelVersReport.py", line 9, in <module>
from arelle import (XbrlConst, XbrlUtil, XmlUtil, UrlUtil, ModelXbrl, ModelDocument, ModelVersObject)
File "/tmp3/Arelle/arelle/ModelDocument.py", line 9, in <module>
from arelle import (XbrlConst, XmlUtil, UrlUtil, ValidateFilingText, XmlValidate)
File "/tmp3/Arelle/arelle/ValidateFilingText.py", line 16, in <module>
docCheckPattern = re.compile(r"&\w+;|[^0-9A-Za-z`~!@#$%&\*\(\)\.\-+ \[\]\{\}\|\:;\"'<>,_?/=\t\n\r\m\f]") # won't match &#nnn;
File "/usr/lib/python3.6/re.py", line 233, in compile
return _compile(pattern, flags)
File "/usr/lib/python3.6/re.py", line 301, in _compile
p = sre_compile.compile(pattern, flags)
File "/usr/lib/python3.6/sre_compile.py", line 562, in compile
p = sre_parse.parse(p, flags)
File "/usr/lib/python3.6/sre_parse.py", line 855, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "/usr/lib/python3.6/sre_parse.py", line 416, in _parse_sub
not nested and not items))
File "/usr/lib/python3.6/sre_parse.py", line 527, in _parse
code1 = _class_escape(source, this)
File "/usr/lib/python3.6/sre_parse.py", line 336, in _class_escape
raise source.error('bad escape %s' % escape, len(escape))
sre_constants.error: bad escape \m at position 67
我发现这个
这是 Arelle 中的错误,出现在 Python 3.6 及更高版本中。有一个 pull request ,但仍然开放(自 2017 年 7 月起)。鉴于 Python 3.6 已经发布了很长一段时间,我不知道为什么还没有修复。
您正在使用 lxml
分支,该分支已 stale for 10 years。所以也许这个错误实际上已经在 master 分支上得到修复(即使拉取请求仍然打开),但在 lxml
分支上没有。如果您愿意,请先尝试从 master 安装。