Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection aborted during compilation (compilation failed) #6387

Closed
Yasand123 opened this issue Oct 27, 2024 · 7 comments
Closed

Connection aborted during compilation (compilation failed) #6387

Yasand123 opened this issue Oct 27, 2024 · 7 comments

Comments

@Yasand123
Copy link

I get the following error when trying to compile the latest version (1.27.7):

======================================================================
ERROR: test_init (test_extractor.TestExtractorModule.test_init)
Test for exceptions in Extractor.initialize() and .finalize()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/john/.cache/yay/gallery-dl/src/gallery-dl/gallery_dl/cache.py", line 32, in __call__
    value = self.cache[key]
            ~~~~~~~~~~^^^^^
KeyError: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/john/.cache/yay/gallery-dl/src/gallery-dl/test/test_extractor.py", line 177, in test_init
    extr.initialize()
  File "/home/batman/.cache/yay/gallery-dl/src/gallery-dl/gallery_dl/extractor/common.py", line 74, in initialize
    self._init()
  File "/home/john/.cache/yay/gallery-dl/src/gallery-dl/gallery_dl/extractor/8chan.py", line 30, in _init
    tos = self.cookies_tos_name()
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/john/.cache/yay/gallery-dl/src/gallery-dl/gallery_dl/cache.py", line 34, in __call__
    value = self.cache[key] = self.func(*args, **kwargs)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/john/.cache/yay/gallery-dl/src/gallery-dl/gallery_dl/extractor/8chan.py", line 37, in cookies_tos_name
    response = self.request(url, headers=headers, allow_redirects=False)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/john/.cache/yay/gallery-dl/src/gallery-dl/gallery_dl/extractor/common.py", line 243, in request
    raise exception.HttpError(msg, response)
gallery_dl.exception.HttpError: ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

----------------------------------------------------------------------

Using a VPN allowed me to compile. So I suspect some adult website it's trying to reach is blocked where I live. I can understand that during usage, but during compilation?

@kattjevfel
Copy link
Contributor

I should probably be adding some exceptions for the tests, like yt-dlp has -m "not download", but honestly I'm a bit lost on which tests I should be avoiding here. (I'm the AUR package maintainer)

Haven't personally ran into this, but should probably not download stuff during building :P

@mikf
Copy link
Owner

mikf commented Oct 27, 2024

This is on me. I've accidentally added a network request during extractor initialization in d7e34e1. This will be removed and I'll also add another test to make sure this won't happen again.

@mikf
Copy link
Owner

mikf commented Oct 27, 2024

I'm a bit lost on which tests I should be avoiding here

def test_init(self):

@kattjevfel
Copy link
Contributor

So normally the tests are not supposed to connect to the internet, then?

@mikf
Copy link
Owner

mikf commented Oct 27, 2024

Generally no, at least not during make test.

There are 3 OAuth tests which try to connect to http://term.ie/oauth/example in test_oauth.py, but this server hasn't been available for several years and the tests just get skipped.

@mikf
Copy link
Owner

mikf commented Oct 27, 2024

Applying 3cbf15a as temporary patch should fix this.

@kattjevfel
Copy link
Contributor

I've cherry picked the commit to the pkgbuild, hopefully this resolves the issue for anyone on a restricted network. I can't test this myself.

@mikf mikf closed this as completed Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants