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

slyr cannot find mdb-export in path #128

Open
skytwosea opened this issue Jan 29, 2022 · 7 comments
Open

slyr cannot find mdb-export in path #128

skytwosea opened this issue Jan 29, 2022 · 7 comments
Labels

Comments

@skytwosea
Copy link

Hello,
I cannot get slyr to find the mdb-export binary. I get the following message:

This algorithm cannot be run :-( The MDB tools "mdb-export" utility is required to convert .style databases. Please setup a path to the MDB tools utility in the Settings - Options dialog, under the SLYR tab.

I have gone to Settings -> Options -> SLYR -> set-MDB-tools-path and have set it to /usr/bin

confirm that mdb-tools is on that path:

which mdb-export
/usr/bin/mdb-export

find / -name "mdb-export"
/usr/bin/mdb-export

platform specs: Kubuntu 20.04, kernel 5.4.0-96-generic on 64-bit Intel i7; QGIS 3.22.3
successfully downloaded slyr plugin to QGIS - slyr appears in processing tools
installed mdb-tools via apt

I would greatly appreciate any help! I'm stumped

@skytwosea
Copy link
Author

skytwosea commented Jan 29, 2022

@nyalldawson In response to recommendation to try the path /usr/bin/mdb-export: I have done this, with an interesting result
I get a python error, complaining that /usr/bin/mdb-export/mdb-export is not a path. Here is the stack trace:

An error has occurred while executing Python code: 

NotADirectoryError: [Errno 20] Not a directory: '/usr/bin/mdb-export/mdb-export' 
Traceback (most recent call last):
  File "/usr/share/qgis/python/plugins/processing/gui/ProcessingToolbox.py", line 241, in executeAlgorithm
    ok, message = alg.canExecute()
  File "/home/skytwosea/.local/share/QGIS/QGIS3/profiles/default/python/plugins/slyr_community/qgis_plugin/algorithms/style_to_xml.py", line 108, in canExecute
    if not Extractor.is_mdb_tools_binary_available():
  File "/home/skytwosea/.local/share/QGIS/QGIS3/profiles/default/python/plugins/slyr_community/bintools/extractor.py", line 143, in is_mdb_tools_binary_available
    with subprocess.Popen(command,
  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
NotADirectoryError: [Errno 20] Not a directory: '/usr/bin/mdb-export/mdb-export'


Python version: 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0] 
QGIS version: 3.22.3-Białowieża Białowieża, 1628765ec7 

This tells me that python is correctly searching the path /usr/bin but is not finding what it needs.
In /usr/bin the mdb binaries are not grouped in a file, they're just dumped in as a set of a dozen or so individual binaries, e.g. mdb-array mdb-export mdb-header etc.
Should they be grouped somehow? It looks like the mdbtools install ran correctly though

@thomfuhrmann
Copy link

I think your path should be set to "/usr/bin/mdb-export", like @nyalldawson mentioned in another reply.

@skytwosea
Copy link
Author

I think your path should be set to "/usr/bin/mdb-export", like @nyalldawson mentioned in another reply.

Hey, as I reported in my post above, this doesn't work. I've included the full stack trace to show what happens when I use this setting.

Any other ideas...?

@severinmenard
Copy link

severinmenard commented Mar 26, 2022

I have the exact same issue than @skytwosea after having installed mdbtools through a basic apt isntall mdbtools: when tyring to set /usr/bin or usr/bin/ as paths I get this error message:

This algorithm cannot be run :-(
The MDB tools "mdb-export" utility is required to convert .style databases. Please setup a path to the MDB tools utility in the Settings - Options dialog, under the SLYR tab

If I set /usr/bin/mdb-export" as path to dbtools, I get this Python error:

An error has occurred while executing Python code:

NotADirectoryError: [Errno 20] is not a folder: '/usr/bin/mdb-export/mdb-export'
Traceback (most recent call last):
File "/usr/share/qgis/python/plugins/processing/gui/ProcessingToolbox.py", line 241, in executeAlgorithm
ok, message = alg.canExecute()
File "/home/severin/.local/share/QGIS/QGIS3/profiles/default/python/plugins/slyr_community/qgis_plugin/algorithms/style_to_xml.py", line 108, in canExecute
if not Extractor.is_mdb_tools_binary_available():
File "/home/severin/.local/share/QGIS/QGIS3/profiles/default/python/plugins/slyr_community/bintools/extractor.py", line 143, in is_mdb_tools_binary_available
with subprocess.Popen(command,
File "/usr/lib/python3.8/subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
NotADirectoryError: [Errno 20] is not a folder: '/usr/bin/mdb-export/mdb-export'

Python version: 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0]
QGIS version: 3.22.5-Białowieża Białowieża, c27231782f

Python Path:
/usr/share/qgis/python
/home/severin/.local/share/QGIS/QGIS3/profiles/default/python
/home/severin/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python38.zip
/usr/lib/python3.8
/usr/lib/python3.8/lib-dynload
/usr/local/lib/python3.8/dist-packages
/usr/lib/python3/dist-packages
/home/severin/.local/share/QGIS/QGIS3/profiles/default/python
/home/severin/.local/share/QGIS/QGIS3/profiles/default/python/plugins/SentinelHub/external/requests_oauthlib-1.3.0-py2.py3-none-any.whl
/home/severin/.local/share/QGIS/QGIS3/profiles/default/python/plugins/HCMGIS/forms

@Tonynovtop
Copy link

I have the exact same issue than @skytwosea after having installed mdbtools through a basic apt isntall mdbtools: when tyring to set /usr/bin or usr/bin/ as paths I get this error message:

This algorithm cannot be run :-(
The MDB tools "mdb-export" utility is required to convert .style databases. Please setup a path to the MDB tools utility in the Settings - Options dialog, under the SLYR tab

If I set /usr/bin/mdb-export" as path to dbtools, I get this Python error:

An error has occurred while executing Python code:

NotADirectoryError: [Errno 20] is not a folder: '/usr/bin/mdb-export/mdb-export'
Traceback (most recent call last):
File "/usr/share/qgis/python/plugins/processing/gui/ProcessingToolbox.py", line 241, in executeAlgorithm
ok, message = alg.canExecute()
File "/home/severin/.local/share/QGIS/QGIS3/profiles/default/python/plugins/slyr_community/qgis_plugin/algorithms/style_to_xml.py", line 108, in canExecute
if not Extractor.is_mdb_tools_binary_available():
File "/home/severin/.local/share/QGIS/QGIS3/profiles/default/python/plugins/slyr_community/bintools/extractor.py", line 143, in is_mdb_tools_binary_available
with subprocess.Popen(command,
File "/usr/lib/python3.8/subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
NotADirectoryError: [Errno 20] is not a folder: '/usr/bin/mdb-export/mdb-export'

Python version: 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0]
QGIS version: 3.22.5-Białowieża Białowieża, c27231782f
Python Path:
/usr/share/qgis/python
/home/severin/.local/share/QGIS/QGIS3/profiles/default/python
/home/severin/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python38.zip
/usr/lib/python3.8
/usr/lib/python3.8/lib-dynload
/usr/local/lib/python3.8/dist-packages
/usr/lib/python3/dist-packages
/home/severin/.local/share/QGIS/QGIS3/profiles/default/python
/home/severin/.local/share/QGIS/QGIS3/profiles/default/python/plugins/SentinelHub/external/requests_oauthlib-1.3.0-py2.py3-none-any.whl
/home/severin/.local/share/QGIS/QGIS3/profiles/default/python/plugins/HCMGIS/forms

I also got the issue.

@Tybion
Copy link

Tybion commented Sep 8, 2022

I get exactly the same problem.

NotADirectoryError: [Errno 20] Not a directory: '/usr/bin/mdb-export/mdb-export'

.. and .. /usr/bin doesn't work either

Python version: 3.6.9 (default, Jun 29 2022, 11:45:57) [GCC 8.4.0]
QGIS version: 3.10.8-A Coruña A Coruña, d09a4f2388

@Tybion
Copy link

Tybion commented Sep 8, 2022

Works with QGIS 3.22.0 on Mac OSX with a Brew install of mdbtools

  • specifying /opt/homebrew/bin/ as the mbtools folder

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

No branches or pull requests

5 participants