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

Problem with reddit.disconnect() #1

Open
pconrad opened this issue May 6, 2014 · 2 comments
Open

Problem with reddit.disconnect() #1

pconrad opened this issue May 6, 2014 · 2 comments

Comments

@pconrad
Copy link
Contributor

pconrad commented May 6, 2014

Problem with reddit.disconnect()

I just dropped reddit.py in a directory, and tried using the reddit object as shown on the readme.rst

However, I got this result:

>>> reddit.disconnect()
Traceback (most recent call last):
  File "./reddit.py", line 135, in disconnect
    with open(filename, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'weatherservice/cache.js on'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "./reddit.py", line 138, in disconnect
    raise WeatherException("The cache file '{}' was not found.".format(filename) )
NameError: global name 'WeatherException' is not defined
>>>
KeyboardInterrupt
>>>

Am I just doing it wrong, or is there a bug?

@acbart
Copy link
Contributor

acbart commented May 6, 2014

Bug! That code is auxliary and was copied over from the weather library carelessly. Pushing the fixed lines now...

@acbart
Copy link
Contributor

acbart commented May 6, 2014

Okay, that should fix it. Just creating the wrong exception.

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

2 participants