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

Pystemon feeder bug #489

Open
Wiindea opened this issue Apr 8, 2020 · 3 comments
Open

Pystemon feeder bug #489

Wiindea opened this issue Apr 8, 2020 · 3 comments

Comments

@Wiindea
Copy link

Wiindea commented Apr 8, 2020

Hello!

I tried to link your framework with pystemon by following these directions, but when I launch the pystemon feeder I get this output...

Traceback (most recent call last):
  File "./bin/feeder/pystemon-feeder.py", line 29, in <module>
    sys.path.append(os.path.join(os.environ['AIL_BIN'], 'lib/'))
  File "/usr/lib/python3.6/os.py", line 669, in __getitem__
    raise KeyError(key) from None
KeyError: 'AIL_BIN'

Any idea about what could cause the error?

@Terrtia
Copy link
Member

Terrtia commented Apr 8, 2020

Hi @Wiindea !

You need to activate the virtual environment:

cd AIL-framework
. ./AILENV/bin/activate

./bin/feeder/pystemon-feeder.py

@Wiindea
Copy link
Author

Wiindea commented Apr 8, 2020

Thanks for the fast answer @Terrtia!

Now I can launch the pystemon feeder, but I can't get anything on the AIL homepage. I think it's related to an error I should have made while setting up pystemon. When launching pystemon, I get some errors each time it downloads files:

Downloading list of new pastes from slexy.org. Will check again in 16 seconds
Downloading url: http://slexy.org/recent with proxy: None and user-agent: None
Downloading url: http://slexy.org/recent with proxy: None and user-agent: None
!!Proxy error on http://slexy.org/recent for proxy None.
Thread for slexy.org crashed unexpectectly, recovering...: local variable 'response' referenced before assignment
Traceback (most recent call last):
  File "./pystemon.py", line 131, in run
    last_pasties = self.get_last_pasties()
  File "./pystemon.py", line 150, in get_last_pasties
    response = download_url(self.archive_url)
  File "./pystemon.py", line 736, in download_url
    return response
UnboundLocalError: local variable 'response' referenced before assignment

Downloading list of new pastes from slexy.org. Will check again in 20 seconds
Downloading url: http://slexy.org/recent with proxy: None and user-agent: None
Downloading url: http://slexy.org/recent with proxy: None and user-agent: None
!!Proxy error on http://slexy.org/recent for proxy None.
Thread for slexy.org crashed unexpectectly, recovering...: local variable 'response' referenced before assignment
Traceback (most recent call last):
  File "./pystemon.py", line 131, in run
    last_pasties = self.get_last_pasties()
  File "./pystemon.py", line 150, in get_last_pasties
    response = download_url(self.archive_url)
  File "./pystemon.py", line 736, in download_url
    return response
UnboundLocalError: local variable 'response' referenced before assignment

Here is an example with Slexy and all the errors I get, but the same also happen with PasteBin.

@0vert1m3
Copy link

0vert1m3 commented May 5, 2020

Thanks for the fast answer @Terrtia!

Now I can launch the pystemon feeder, but I can't get anything on the AIL homepage. I think it's related to an error I should have made while setting up pystemon. When launching pystemon, I get some errors each time it downloads files:

Downloading list of new pastes from slexy.org. Will check again in 16 seconds
Downloading url: http://slexy.org/recent with proxy: None and user-agent: None
Downloading url: http://slexy.org/recent with proxy: None and user-agent: None
!!Proxy error on http://slexy.org/recent for proxy None.
Thread for slexy.org crashed unexpectectly, recovering...: local variable 'response' referenced before assignment
Traceback (most recent call last):
  File "./pystemon.py", line 131, in run
    last_pasties = self.get_last_pasties()
  File "./pystemon.py", line 150, in get_last_pasties
    response = download_url(self.archive_url)
  File "./pystemon.py", line 736, in download_url
    return response
UnboundLocalError: local variable 'response' referenced before assignment

Downloading list of new pastes from slexy.org. Will check again in 20 seconds
Downloading url: http://slexy.org/recent with proxy: None and user-agent: None
Downloading url: http://slexy.org/recent with proxy: None and user-agent: None
!!Proxy error on http://slexy.org/recent for proxy None.
Thread for slexy.org crashed unexpectectly, recovering...: local variable 'response' referenced before assignment
Traceback (most recent call last):
  File "./pystemon.py", line 131, in run
    last_pasties = self.get_last_pasties()
  File "./pystemon.py", line 150, in get_last_pasties
    response = download_url(self.archive_url)
  File "./pystemon.py", line 736, in download_url
    return response
UnboundLocalError: local variable 'response' referenced before assignment

Here is an example with Slexy and all the errors I get, but the same also happen with PasteBin.

I had the same problem today the fix is not to use the old version that circl is providing else install "https://github.com/cvandeplas/pystemon" and turn save / save-all on your module to on and switch Redis query / query-all too on as well works perfectly for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants