-
Notifications
You must be signed in to change notification settings - Fork 501
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/convert' #43
Comments
As stated in the requirements, you have to install Other users under OS X also had to install If after installing these dependencies you still get the error message above, you might have to adapt the |
I've installed also |
If you open your Terminal and enter |
Ok! Using |
No problem, glad I could help! |
@danielquinn Should we maybe do something like this and rely on the binary being on the path by default? diff --git a/src/documents/consumer.py b/src/documents/consumer.py
index 5ca4281..f7791b1 100644
--- a/src/documents/consumer.py
+++ b/src/documents/consumer.py
@@ -50,7 +50,7 @@ class Consumer(object):
"""
SCRATCH = settings.SCRATCH_DIR
- CONVERT = settings.CONVERT_BINARY
+ CONVERT = settings.CONVERT_BINARY if settings.CONVERT_BINARY else "convert"
CONSUME = settings.CONSUMPTION_DIR
THREADS = int(settings.OCR_THREADS) if settings.OCR_THREADS else None
diff --git a/src/paperless/settings.py b/src/paperless/settings.py
index 4449899..f853c5f 100644
--- a/src/paperless/settings.py
+++ b/src/paperless/settings.py
@@ -159,7 +159,8 @@ FORGIVING_OCR = True
GNUPG_HOME = os.environ.get("HOME", "/dev/null")
# Convert is part of the Imagemagick package
-CONVERT_BINARY = "/usr/bin/convert"
+# If it is not on your PATH, you can specify the absolut path to the binary here
+CONVERT_BINARY = None
# This will be created if it doesn't exist
SCRATCH_DIR = "/tmp/paperless" |
I had a similar thought when I saw this issue come up, but I think it might be best to just set |
Yes, good thinking. On the topic of naming the environment variable, should we try to name them like the variables, only prefixed with
Maybe renaming one or the other to make them match might be worth thinking about and possibly adding missing ones. |
There you go again, being all rational :-P This is an excellent point. I'll create an issue and point it to this comment and will get to it soon. |
Sorry ;) |
Hi, when I run ./manage.py document_consumer this come out (OS X El Capitan)
Traceback (most recent call last): File "./manage.py", line 18, in <module> execute_from_command_line(sys.argv) File "/Users/Francesco/Library/Python/3.5/lib/python/site-packages/django/core/management/__init__.py", line 350, in execute_from_command_line utility.execute() File "/Users/Francesco/Library/Python/3.5/lib/python/site-packages/django/core/management/__init__.py", line 342, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/Francesco/Library/Python/3.5/lib/python/site-packages/django/core/management/base.py", line 348, in run_from_argv self.execute(*args, **cmd_options) File "/Users/Francesco/Library/Python/3.5/lib/python/site-packages/django/core/management/base.py", line 399, in execute output = self.handle(*args, **options) File "/Users/Francesco/Desktop/paperless-master/src/documents/management/commands/document_consumer.py", line 49, in handle self.loop() File "/Users/Francesco/Desktop/paperless-master/src/documents/management/commands/document_consumer.py", line 59, in loop self.file_consumer.consume() File "/Users/Francesco/Desktop/paperless-master/src/documents/consumer.py", line 116, in consume pngs = self._get_greyscale(tempdir, doc) File "/Users/Francesco/Desktop/paperless-master/src/documents/consumer.py", line 139, in _get_greyscale "-type", "grayscale", doc, png File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 950, in __init__ restore_signals, start_new_session) File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 1544, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/convert'
I've installed pip3 requirements from requirements.txt.
The text was updated successfully, but these errors were encountered: