TypeError: stat: path should be string, bytes, os.PathLike or integer, not GeminiClient #11

Closed
opened 2020-05-27 05:07:28 +00:00 by michael-lazar · 1 comment
Contributor

The new code looks great!

I just pulled down the master branch. Attempting to access a gemini URL that returns a status of "62"

AV-98> 2
The site localhost is requesting a client certificate.
This will allow the site to recognise you across requests.
What do you want to do?
1. Give up.
2. Generate new certificate and retry the request.
3. Load previously generated certificate from file.
4. Load certificate from file and retry the request.
> 2
What do you want to name this new certificate?
Answering `mycert` will create `~/.av98/certs/mycert.crt` and `~/.av98/certs/mycert.key`
mycert
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/cmd.py", line 214, in onecmd
    func = getattr(self, 'do_' + cmd)
AttributeError: 'GeminiClient' object has no attribute 'do_2'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/av98", line 1526, in <module>
    main()
  File "/usr/local/bin/av98", line 1521, in main
    gc.cmdloop()
  File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/cmd.py", line 138, in cmdloop
    stop = self.onecmd(line)
  File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/cmd.py", line 216, in onecmd
    return self.default(line)
  File "/usr/local/bin/av98", line 999, in default
    self._go_to_gi(gi)
  File "/usr/local/bin/av98", line 485, in _go_to_gi
    self._generate_persistent_client_cert()
  File "/usr/local/bin/av98", line 924, in _generate_persistent_client_cert
    self._generate_client_cert(self, certdir, name)
  File "/usr/local/bin/av98", line 927, in _generate_client_cert
    if not os.path.exists(certdir):
  File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/genericpath.py", line 19, in exists
    os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not GeminiClient
The new code looks great! I just pulled down the master branch. Attempting to access a gemini URL that returns a status of "62" ``` AV-98> 2 The site localhost is requesting a client certificate. This will allow the site to recognise you across requests. What do you want to do? 1. Give up. 2. Generate new certificate and retry the request. 3. Load previously generated certificate from file. 4. Load certificate from file and retry the request. > 2 What do you want to name this new certificate? Answering `mycert` will create `~/.av98/certs/mycert.crt` and `~/.av98/certs/mycert.key` mycert Traceback (most recent call last): File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/cmd.py", line 214, in onecmd func = getattr(self, 'do_' + cmd) AttributeError: 'GeminiClient' object has no attribute 'do_2' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/bin/av98", line 1526, in <module> main() File "/usr/local/bin/av98", line 1521, in main gc.cmdloop() File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/cmd.py", line 138, in cmdloop stop = self.onecmd(line) File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/cmd.py", line 216, in onecmd return self.default(line) File "/usr/local/bin/av98", line 999, in default self._go_to_gi(gi) File "/usr/local/bin/av98", line 485, in _go_to_gi self._generate_persistent_client_cert() File "/usr/local/bin/av98", line 924, in _generate_persistent_client_cert self._generate_client_cert(self, certdir, name) File "/usr/local/bin/av98", line 927, in _generate_client_cert if not os.path.exists(certdir): File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/genericpath.py", line 19, in exists os.stat(path) TypeError: stat: path should be string, bytes, os.PathLike or integer, not GeminiClient ```
Owner

Hey, thanks a lot for helping to test the new code! Sorry for this silly bug, it should work now.

Hey, thanks a lot for helping to test the new code! Sorry for this silly bug, it should work now.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: solderpunk/AV-98#11
No description provided.