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

Not processing images - can we skip the creation of a local storage path #84

Closed
lsemel opened this issue Apr 11, 2014 · 6 comments
Closed

Comments

@lsemel
Copy link
Contributor

lsemel commented Apr 11, 2014

We're not using Goose to process any images, but despite this it requires the existence of a local storage path, and complains if it can't write to the server's filesystem. I have to make sure /tmp/goose is always available and writable, and occasionally get errors from Goose complaining that it can't write some file there.

Is there a way to turn this feature off completely and never have Goose write to the local filesystem, even if it disables image processing?

@nathanathan
Copy link
Contributor

There is a flag to disable image processing here:

self.enable_image_fetching = True

However, it looks like the initialize function here (

def initialize(self):
) will always check if it can write to the local storage folder and raise an error if it can't.

@nathanathan
Copy link
Contributor

Here's the work around I'm using:

class FileFreeGoose(goose.Goose):
    def initialize(self):
        pass

FileFreeGoose({
  'parser_class':'soup',
  'enable_image_fetching' : False,
})

grangier pushed a commit that referenced this issue Apr 22, 2014
@grangier
Copy link
Owner

Hello,

Please test this branch and let me know if it suits your needs https://github.com/grangier/python-goose/tree/feature/access-local-84

xav

@nathanathan
Copy link
Contributor

👍 Looks great!

@lsemel
Copy link
Contributor Author

lsemel commented Apr 22, 2014

Looks good to me!

@grangier
Copy link
Owner

Should be fix in the latest head 6430e1d

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