SUSYUSTC / MathTranslate

translate scientific papers in latex, especially arxiv papers
https://github.com/SUSYUSTC/MathTranslate
Apache License 2.0
1.05k stars 69 forks source link

HTTP Error 503+PermissionError: [WinError 32] +PermissionError: [WinError 5]+RecursionError #39

Closed Ghostasky closed 1 year ago

Ghostasky commented 1 year ago

here are some error:

This is the result of executing:

translate_arxiv 2205.15510
The current mathtranslate is latest
Start
engine google
language from en
language to zh-CN

arxiv number: 2205.15510

temporary directory C:\Users\29927\AppData\Local\Temp\tmpyucy8gow
trying to download from https://arxiv.org/e-print/2205.15510
main tex files found:
.\main.tex
.\MOB-ML for dipole\main.tex
Processing .\main
Cache is found
It is a full latex document
  0%|                                                                                           | 0/49 [00:00<?, ?it/s]Error found in Parapragh 1
Content
  \date{\today}
  \begin{abstract}
This study extends the accurate and transferable molecular-orbital-based machine learning (MOB-ML) approach to modeling the contribution of electron correlation to dipole moments at the cost of Hartree--Fock computations.
A molecular-orbital-based (MOB) pairwise decomposition of the correlation part of the dipole moment is applied, and these pair dipole moments could be further regressed as a universal function of molecular orbitals (MOs).
The dipole MOB features consist of the energy MOB features and their responses to electric fields.
An interpretable and rotationally equivariant Gaussian process regression (GPR) with derivatives algorithm is introduced to learn the dipole moment more efficiently.
The proposed problem setup, feature design, and ML algorithm are shown to provide highly-accurate models for both dipole moment and energies on water and fourteen small molecules.
To demonstrate the ability of MOB-ML to function as generalized density-matrix functionals for molecular dipole moments and energies of organic molecules, we further apply the proposed MOB-ML approach to train and test the molecules from the QM9 dataset.
The application of local scalable GPR with Gaussian mixture model unsupervised clustering (GMM/GPR) scales up MOB-ML to a large-data regime while retaining the prediction accuracy.
In addition, compared with literature results, MOB-ML provides the best test MAEs of 4.21 mDebye and 0.045 kcal/mol for dipole moment and energy models, respectively, when training on 110000 QM9 molecules. The excellent transferability of the resulting QM9 models is also illustrated by the accurate predictions for four different series of peptides.
\end{abstract}
  2%|█▋                                                                                 | 1/49 [00:00<00:27,  1.78it/s]
Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\site-packages\mathtranslate\translate_arxiv.py", line 143, in main
    success = translate_dir('.', options)
  File "C:\Program Files\Python310\lib\site-packages\mathtranslate\translate_arxiv.py", line 75, in translate_dir
    translate_single_tex_file(file_path, file_path, options.engine, options.l_from, options.l_to, options.debug)
  File "C:\Program Files\Python310\lib\site-packages\mathtranslate\translate.py", line 255, in translate_single_tex_file
    text_final = latex_translator.translate_full_latex(text_original)
  File "C:\Program Files\Python310\lib\site-packages\mathtranslate\translate.py", line 227, in translate_full_latex
    raise e
  File "C:\Program Files\Python310\lib\site-packages\mathtranslate\translate.py", line 220, in translate_full_latex
    latex_translated_paragraph = self.translate_paragraph_latex(latex_original_paragraph)
  File "C:\Program Files\Python310\lib\site-packages\mathtranslate\translate.py", line 163, in translate_paragraph_latex
    latex_translated_paragraph = self.translate_text_in_paragraph_latex_and_leading_brace(latex_original_paragraph)
  File "C:\Program Files\Python310\lib\site-packages\mathtranslate\translate.py", line 158, in translate_text_in_paragraph_latex_and_leading_brace
    latex_translated_paragraph = self.translate_text_in_paragraph_latex(latex_original_paragraph)
  File "C:\Program Files\Python310\lib\site-packages\mathtranslate\translate.py", line 137, in translate_text_in_paragraph_latex
    result += self._translate_text_in_paragraph_latex(split) + ' ' + sep + ' '
  File "C:\Program Files\Python310\lib\site-packages\mathtranslate\translate.py", line 120, in _translate_text_in_paragraph_latex
    text_translated_paragraph = self.translate_paragraph_text(text_original_paragraph)
  File "C:\Program Files\Python310\lib\site-packages\mathtranslate\translate.py", line 95, in translate_paragraph_text
    parts_translated.append(self.translator.translate(part))
  File "C:\Program Files\Python310\lib\site-packages\mathtranslate\translate.py", line 55, in translate
    raise e
  File "C:\Program Files\Python310\lib\site-packages\mathtranslate\translate.py", line 49, in translate
    result = self.try_translate(text)
  File "C:\Program Files\Python310\lib\site-packages\mathtranslate\translate.py", line 41, in try_translate
    return self.translator.translate(text, self.language_to, self.language_from)
  File "C:\Program Files\Python310\lib\site-packages\mtranslate\core.py", line 80, in translate
    raw_data = urllib.request.urlopen(request).read()
  File "C:\Program Files\Python310\lib\urllib\request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Program Files\Python310\lib\urllib\request.py", line 525, in open
    response = meth(req, response)
  File "C:\Program Files\Python310\lib\urllib\request.py", line 634, in http_response
    response = self.parent.error(
  File "C:\Program Files\Python310\lib\urllib\request.py", line 563, in error
    return self._call_chain(*args)
  File "C:\Program Files\Python310\lib\urllib\request.py", line 496, in _call_chain
    result = func(*args)
  File "C:\Program Files\Python310\lib\urllib\request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 503: Service Unavailable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\shutil.py", line 622, in _rmtree_unsafe
    os.rmdir(path)
PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'C:\\Users\\29927\\AppData\\Local\\Temp\\tmpyucy8gow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\tempfile.py", line 843, in onerror
    _os.unlink(path)
PermissionError: [WinError 5] 拒绝访问。: 'C:\\Users\\29927\\AppData\\Local\\Temp\\tmpyucy8gow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\shutil.py", line 622, in _rmtree_unsafe
    os.rmdir(path)
PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'C:\\Users\\29927\\AppData\\Local\\Temp\\tmpyucy8gow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\tempfile.py", line 843, in onerror
    _os.unlink(path)
PermissionError: [WinError 5] 拒绝访问。: 'C:\\Users\\29927\\AppData\\Local\\Temp\\tmpyucy8gow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\shutil.py", line 622, in _rmtree_unsafe
    os.rmdir(path)
PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'C:\\Users\\29927\\AppData\\Local\\Temp\\tmpyucy8gow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\tempfile.py", line 843, in onerror
    _os.unlink(path)
PermissionError: [WinError 5] 拒绝访问。: 'C:\\Users\\29927\\AppData\\Local\\Temp\\tmpyucy8gow'

......
.....
......
    onerror(os.rmdir, path, sys.exc_info())
  File "C:\Program Files\Python310\lib\tempfile.py", line 846, in onerror
    cls._rmtree(path, ignore_errors=ignore_errors)
  File "C:\Program Files\Python310\lib\tempfile.py", line 855, in _rmtree
    _shutil.rmtree(name, onerror=onerror)
  File "C:\Program Files\Python310\lib\shutil.py", line 750, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\Program Files\Python310\lib\shutil.py", line 624, in _rmtree_unsafe
    onerror(os.rmdir, path, sys.exc_info())
  File "C:\Program Files\Python310\lib\tempfile.py", line 846, in onerror
    cls._rmtree(path, ignore_errors=ignore_errors)
  File "C:\Program Files\Python310\lib\tempfile.py", line 855, in _rmtree
    _shutil.rmtree(name, onerror=onerror)
  File "C:\Program Files\Python310\lib\shutil.py", line 750, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\Program Files\Python310\lib\shutil.py", line 624, in _rmtree_unsafe
    onerror(os.rmdir, path, sys.exc_info())
  File "C:\Program Files\Python310\lib\tempfile.py", line 846, in onerror
    cls._rmtree(path, ignore_errors=ignore_errors)
  File "C:\Program Files\Python310\lib\tempfile.py", line 855, in _rmtree
    _shutil.rmtree(name, onerror=onerror)
  File "C:\Program Files\Python310\lib\shutil.py", line 750, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\Program Files\Python310\lib\shutil.py", line 624, in _rmtree_unsafe
    onerror(os.rmdir, path, sys.exc_info())
  File "C:\Program Files\Python310\lib\tempfile.py", line 846, in onerror
    cls._rmtree(path, ignore_errors=ignore_errors)
  File "C:\Program Files\Python310\lib\tempfile.py", line 855, in _rmtree
    _shutil.rmtree(name, onerror=onerror)
  File "C:\Program Files\Python310\lib\shutil.py", line 750, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\Program Files\Python310\lib\shutil.py", line 624, in _rmtree_unsafe
    onerror(os.rmdir, path, sys.exc_info())
  File "C:\Program Files\Python310\lib\tempfile.py", line 846, in onerror
    cls._rmtree(path, ignore_errors=ignore_errors)
  File "C:\Program Files\Python310\lib\tempfile.py", line 855, in _rmtree
    _shutil.rmtree(name, onerror=onerror)
  File "C:\Program Files\Python310\lib\shutil.py", line 750, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\Program Files\Python310\lib\shutil.py", line 624, in _rmtree_unsafe
    onerror(os.rmdir, path, sys.exc_info())
  File "C:\Program Files\Python310\lib\tempfile.py", line 840, in onerror
    resetperms(path)
  File "C:\Program Files\Python310\lib\tempfile.py", line 832, in resetperms
    _os.chflags(path, 0)
RecursionError: maximum recursion depth exceeded while calling a Python object

But actually I'm already an administrator

SUSYUSTC commented 1 year ago

This seems to be a network error. However the super-long error information is not expected and is already solved in the newest version. please pip install --upgrade mathtranslate to avoid long error information in the future.