1

Whenever I try to submit a problem, I get this error:

Connecting.......... Could not connect to GitHub, it seems you are offline. Submission cancelled.

What I did :

First I create Virtual Environments on my Ubuntu 22.04.1 LTS using python3.10.6

python3.10  -m venv venv

After that, I activated it and install submit50 following this guide.

python3.10 -m pip install submit50

The SSH code :

ssh -T -p443 [email protected]

Output:

Hi  <USERNAME>! You've successfully authenticated, but GitHub does not provide shell access.

I used this code to create a log.

submit50 --log-level debug

Output:

    Connecting...
Could not connect to GitHub, it seems you are offline.
Traceback (most recent call last):
  File "/home/snpay/programming/venv/lib/python3.10/site-packages/lib50/_api.py", line 801, in _get_branches
    output = child.read().strip().split("\r\n")
  File "/home/snpay/programming/venv/lib/python3.10/site-packages/pexpect/spawnbase.py", line 444, in read
    self.expect(self.delimiter)
  File "/home/snpay/programming/venv/lib/python3.10/site-packages/pexpect/spawnbase.py", line 343, in expect
    return self.expect_list(compiled_pattern_list,
  File "/home/snpay/programming/venv/lib/python3.10/site-packages/pexpect/spawnbase.py", line 372, in expect_list
    return exp.expect_loop(timeout)
  File "/home/snpay/programming/venv/lib/python3.10/site-packages/pexpect/expect.py", line 181, in expect_loop
    return self.timeout(e)
  File "/home/snpay/programming/venv/lib/python3.10/site-packages/pexpect/expect.py", line 144, in timeout
    raise exc
pexpect.exceptions.TIMEOUT: Timeout exceeded.
<pexpect.pty_spawn.spawn object at 0x7f3ae7d1ff70>
command: /usr/bin/git
args: [b'/usr/bin/git', b'ls-remote', b'--heads', b'https://github.com/cs50/problems']
buffer (last 100 chars): ''
before (last 100 chars): ''
after: <class 'pexpect.exceptions.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 13342
child_fd: 5
closed: False
timeout: 3
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: <lib50._api._StreamToLogger object at 0x7f3ae7d1ee30>
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
    0: EOF

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/snpay/programming/venv/lib/python3.10/site-packages/lib50/_api.py", line 761, in __init__
    branches = self._get_branches()
  File "/home/snpay/programming/venv/lib/python3.10/site-packages/lib50/_api.py", line 806, in _get_branches
    raise TimeoutError(3)
lib50._errors.TimeoutError: 3

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/snpay/programming/venv/bin/submit50", line 8, in <module>
    sys.exit(main())
  File "/home/snpay/programming/venv/lib/python3.10/site-packages/submit50/__main__.py", line 218, in main
    user_name, commit_hash, message = lib50.push("submit50", args.slug, CONFIG_LOADER, prompt=prompt)
  File "/home/snpay/programming/venv/lib/python3.10/site-packages/lib50/_api.py", line 89, in push
    remote, (honesty, included, excluded) = connect(slug, config_loader, file_limit=DEFAULT_FILE_LIMIT)
  File "/home/snpay/programming/venv/lib/python3.10/site-packages/lib50/_api.py", line 357, in connect
    config_yaml = fetch_config(slug)
  File "/home/snpay/programming/venv/lib/python3.10/site-packages/lib50/_api.py", line 536, in fetch_config
    slug = Slug(slug)
  File "/home/snpay/programming/venv/lib/python3.10/site-packages/lib50/_api.py", line 764, in __init__
    raise ConnectionError("Could not connect to GitHub, it seems you are offline.")
lib50._errors.ConnectionError: Could not connect to GitHub, it seems you are offline.
Submission cancelled.

0

You must log in to answer this question.

Browse other questions tagged .