Skip to content

Bug: 论文名称过长导致获取失败 #111

@Marine-rubbish

Description

@Marine-rubbish

在运行Send emails daily这个workflow的时候出现了文件获取失败的问题:

Traceback (most recent call last):
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/main.py", line 182, in <module>
    html = render_email(papers)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/construct_email.py", line 135, in render_email
    if p.affiliations is not None:
       ^^^^^^^^^^^^^^
  File "/home/runner/.local/share/uv/python/cpython-3.11.10-linux-x86_64-gnu/lib/python3.11/functools.py", line 1001, in __get__
    val = self.func(instance)
          ^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/paper.py", line 205, in affiliations
    if self.tex is not None:
       ^^^^^^^^
  File "/home/runner/.local/share/uv/python/cpython-3.11.10-linux-x86_64-gnu/lib/python3.11/functools.py", line 1001, in __get__
    val = self.func(instance)
          ^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/paper.py", line 74, in tex
    file = self._paper.download_source(dirpath=tmpdirname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.11/site-packages/arxiv/__init__.py", line 227, in download_source
    written_path, _ = urlretrieve(source_url, path)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/.local/share/uv/python/cpython-3.11.10-linux-x86_64-gnu/lib/python3.11/urllib/request.py", line 251, in urlretrieve
    tfp = open(filename, 'wb')
          ^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 36] File name too long: '/tmp/tmpkf37ewqy/2509.01526v1.Prediction__Generation_of_WWTPs_microbiome_community_structures_and_Clustering_of_WWTPs_various_feature_attributes_using_DE_BP_model__SiTime_GAN_model_and_DPNG_EPMC_ensemble_clustering_algorithm_with_modulation_of_microbial_ecosystem_health.tar.gz'
Error: Process completed with exit code 1.

可能与文件名过长有关,这个bug需要修复

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions