Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

TypeError: get_proxies() missing 1 required positional argument: 'proxies' [BUG] #420

Open
Midnightzzz opened this issue Apr 4, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@Midnightzzz
Copy link

Bug Report Form

Checklist

  • [ V] I am using the latest version of the code.
  • [V ] I am absolutely sure I read the README in its entirety.
  • [V ] I have made sure this is not a duplicate issue.
  • [V] I have filled out this form correctly.

Describe the bug

Whenever I add proxies to the code, the command prompt starts and then closes after a short while

To Reproduce

Steps to trigger the bug:

  1. Open up conffig.json
  2. Add "proxies": [ "1.1.1.1:8080", "2.2.2.2:1234" ], to the code under "unverified_place_frequency": false,
    3.Start command prompt
  3. Debug to see error
  4. See error

Expected behavior

Expected to run with rerouting through proxies

@Midnightzzz Midnightzzz added the bug Something isn't working label Apr 4, 2022
@TheK098
Copy link

TheK098 commented Apr 4, 2022

I have the same bug

@bolshoytoster
Copy link

@Midnightzzz @TheK098 could you try this:

diff --git a/src/proxy.py b/src/proxy.py
index ef97c80..112b1c2 100644
--- a/src/proxy.py
+++ b/src/proxy.py
@@ -8,14 +8,14 @@ from stem.control import Controller
 
 def Init(self):
     self.proxies = (
-        get_proxies(self.json_data["proxies"])
+        get_proxies(self, self.json_data["proxies"])
         if "proxies" in self.json_data and self.json_data["proxies"] is not None
         else None
     )
     if self.proxies is None and os.path.exists(
         os.path.join(os.getcwd(), "proxies.txt")
     ):
-        self.proxies = get_proxies_text()
+        self.proxies = get_proxies_text(self)
     self.compactlogging = (
         self.json_data["compact_logging"]
         if "compact_logging" in self.json_data

@Midnightzzz
Copy link
Author

@Midnightzzz @TheK098 could you try this:

diff --git a/src/proxy.py b/src/proxy.py
index ef97c80..112b1c2 100644
--- a/src/proxy.py
+++ b/src/proxy.py
@@ -8,14 +8,14 @@ from stem.control import Controller
 
 def Init(self):
     self.proxies = (
-        get_proxies(self.json_data["proxies"])
+        get_proxies(self, self.json_data["proxies"])
         if "proxies" in self.json_data and self.json_data["proxies"] is not None
         else None
     )
     if self.proxies is None and os.path.exists(
         os.path.join(os.getcwd(), "proxies.txt")
     ):
-        self.proxies = get_proxies_text()
+        self.proxies = get_proxies_text(self)
     self.compactlogging = (
         self.json_data["compact_logging"]
         if "compact_logging" in self.json_data

Works now, just have trouble connecting to web socket

@bolshoytoster
Copy link

@Midnightzzz I think if you download the latest version it should work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants