raguay / DropboxConnect

Connecting fman with Dropbox.
MIT License
13 stars 1 forks source link

Error loading #4

Closed ave-63 closed 5 years ago

ave-63 commented 6 years ago

Got this error when I tried to install the plugin. I tried removing and installing it again but no luck. I'm running windows 10 on a 2017 surface pro.

Plugin 'DropboxConnect' failed to load.

Traceback (most recent call last): File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect/dropbox-sdk-python\pkg_resources__init__.py", line 474, in get_build_platform from sysconfig import get_platform ImportError: No module named 'sysconfig'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "fman\impl\plugins\plugin.py", line 146, in load File "fman\impl\plugins\plugin.py", line 161, in _load File "fman\impl\plugins\plugin.py", line 176, in _load_classes File "fman\impl\plugins\plugin.py", line 228, in _load_packages File "", line 418, in _check_name_wrapper File "", line 841, in load_module File "", line 700, in load_module File "", line 268, in _load_module_shim File "", line 693, in _load File "", line 673, in _load_unlocked File "", line 697, in exec_module File "", line 222, in _call_with_frames_removed File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect\dropboxconnect__init.py", line 17, in import dropbox File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect/dropbox-sdk-python\dropbox__init.py", line 3, in from .dropbox import version, Dropbox, DropboxTeam, create_session # noqa: F401 File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect/dropbox-sdk-python\dropbox\dropbox.py", line 35, in from .session import ( File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect/dropbox-sdk-python\dropbox\session.py", line 1, in import pkg_resources File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect/dropbox-sdk-python\pkg_resources__init__.py", line 1040, in class Environment(object): File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect/dropbox-sdk-python\pkg_resources\init.py", line 1043, in Environment def init(self, search_path=None, platform=get_supported_platform(), File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect/dropbox-sdk-python\pkg_resources\init__.py", line 272, in get_supported_platform plat = get_build_platform() File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect/dropbox-sdk-python\pkg_resources\init__.py", line 476, in get_build_platform from distutils.util import get_platform ImportError: No module named 'distutils.util'

oskretc commented 6 years ago

Got the same error, has anyone found a solution?

raguay commented 6 years ago

If you copy a copy of the library mentioned in the error report into the DropboxConnect/dropbox-sdk-python directory in where ever the plugins are kept on a windows system, then it should tell you what other libraries are missing. The issue is that each version of Fman has different Python libraries bundled together. I currently on have macOS and Linux to test. I don't have a working windows system right now.

I'll try to trace it down, but if you want to help, just install the libraries missing in the error output where I told you until it doesn't have a missing library. Then let me know which ones you needed to include and I'll patch up the whole.

Richard

On Mon, Apr 9, 2018 at 7:54 PM, oskretc notifications@github.com wrote:

Got the same error, has anyone found a solution?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/raguay/DropboxConnect/issues/4#issuecomment-379741511, or mute the thread https://github.com/notifications/unsubscribe-auth/ACX0x11lKoJCTGmT4goEdMpi-J_WbAG9ks5tm1oEgaJpZM4SwpIa .

ave-63 commented 6 years ago

OK, but I'm a little confused. In the directory DropboxConnect/dropbox-sdk-python/distutils, there are the files sysconfig.py and util.py. The error says it's missing sysconfig and distutils.utils (with a period where I'd think a / should go). Should I copy both of these files up one directory into DropboxConnect/dropbox-sdk-python?

ave-63 commented 6 years ago

Hey, I just moved sysconfig.py to the dropbox-sdk-python directory, restarted fman, and it looks like it works now. Thanks!

raguay commented 6 years ago

I believe the one in distutils is a little bit different than the standard one. That is part of the confusing mess of python libraries. Some libraries embed the own versions of other libraries. That then creates a problem with version-itis! Haskell is much worse at this.

So, you just needed that one library repeated? Okay.

raguay commented 6 years ago

Added and pushed. See if this issue is now settled or not?

ave-63 commented 6 years ago

So I uninstalled dropbox connect, then re-installed it, and then restarted fman and there was another error. Looks like something about distutils this time? I can try to add a file to the dropbox-sdk-python directory but I'm not sure where to get the file from.

Plugin 'DropboxConnect' failed to load.

Traceback (most recent call last): File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect/dropbox-sdk-python\pkg_resources__init__.py", line 474, in get_build_platform from sysconfig import get_platform File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect/dropbox-sdk-python\sysconfig.py", line 17, in from .errors import DistutilsPlatformError ImportError: attempted relative import with no known parent package

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "fman\impl\plugins\plugin.py", line 146, in load File "fman\impl\plugins\plugin.py", line 161, in _load File "fman\impl\plugins\plugin.py", line 176, in _load_classes File "fman\impl\plugins\plugin.py", line 228, in _load_packages File "", line 418, in _check_name_wrapper File "", line 841, in load_module File "", line 700, in load_module File "", line 268, in _load_module_shim File "", line 693, in _load File "", line 673, in _load_unlocked File "", line 697, in exec_module File "", line 222, in _call_with_frames_removed File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect\dropboxconnect__init.py", line 17, in import dropbox File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect/dropbox-sdk-python\dropbox__init.py", line 3, in from .dropbox import version, Dropbox, DropboxTeam, create_session # noqa: F401 File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect/dropbox-sdk-python\dropbox\dropbox.py", line 35, in from .session import ( File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect/dropbox-sdk-python\dropbox\session.py", line 1, in import pkg_resources File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect/dropbox-sdk-python\pkg_resources__init__.py", line 1040, in class Environment(object): File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect/dropbox-sdk-python\pkg_resources\init.py", line 1043, in Environment def init(self, search_path=None, platform=get_supported_platform(), File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect/dropbox-sdk-python\pkg_resources\init__.py", line 272, in get_supported_platform plat = get_build_platform() File "C:\Users\bensm\AppData\Roaming\fman\Plugins\Third-party\DropboxConnect/dropbox-sdk-python\pkg_resources\init__.py", line 476, in get_build_platform from distutils.util import get_platform ImportError: No module named 'distutils.util'

raguay commented 6 years ago

This is what I was concerned about. The library is there, but for some reason the python engine isn't seeing it. I made a change to appending the new library location that should be more system agnostic (though everything I've read says you don't have too with Python, but it's the only thing I can see). I just pushed that fix. Give this a try and let me know what you see.

Sorry, I live in Thailand. Therefore the back and forth will take a while. 😃

raguay commented 6 years ago

Make sure you download version 2.02.

oskretc commented 6 years ago

I installed 2.02 and got the same error as @ave-63

Bypass the error by removing the call and hardcoding my system like

    # try:
    #     # Python 2.7 or >=3.2
    #     from sysconfig import get_platform
    # except ImportError:
    #     from distutils.util import get_platform

    # plat = get_platform()
    plat='win32'

The error is gone, and after configuring the secret and db. still not showing any files from dropbox

I'm in Win7 btw

ave-63 commented 6 years ago

Yup still happening with 2.02 for me.

raguay commented 6 years ago

I just pushed a release to use the proper path separator. Not sure how to fix the library issue other than hardcode it for Windows and release two version of the plugin. If one of you could apply the fix for the library loading above and try this new one, 2.03. Let me know if you can see files this time. I'm still trying to get my Windows system working. I have XP in a virtual machine, but fman doesn't run on XP.

MartinBulla commented 5 years ago

I am getting similar error on Mac Mojave:

Plugin 'DropboxConnect' failed to load.

Traceback (most recent call last): File "fman/impl/plugins/plugin.py", line 125, in load File "fman/impl/plugins/plugin.py", line 141, in _load File "fman/impl/plugins/plugin.py", line 164, in _load_classes File "fman/impl/plugins/plugin.py", line 229, in _load_packages File "", line 399, in _check_name_wrapper File "", line 823, in load_module File "", line 682, in load_module File "", line 265, in _load_module_shim File "", line 684, in _load File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/Users/martinbulla/Library/Application Support/fman/Plugins/Third-party/DropboxConnect/dropboxconnect/init.py", line 22, in import dropbox File "/Users/martinbulla/Library/Application Support/fman/Plugins/Third-party/DropboxConnect/dropbox-sdk-python/dropbox/init.py", line 3, in from .dropbox import version, Dropbox, DropboxTeam, create_session # noqa: F401 File "/Users/martinbulla/Library/Application Support/fman/Plugins/Third-party/DropboxConnect/dropbox-sdk-python/dropbox/dropbox.py", line 18, in import six ModuleNotFoundError: No module named 'six'

Any ideas how to solve it?

raguay commented 5 years ago

Hi, Just updated the Dropbox library to the latest version. Also, I added the new modules that it requires. Please remove your plugin and re-install to get release 2.1.

MartinBulla commented 5 years ago

Fantastic. It works now. Thank you very much for this.

On Tue, 12 Mar 2019 at 06:25, Richard Guay notifications@github.com wrote:

Hi, Just updated the Dropbox library to the latest version. Also, I added the new modules that it requires. Please remove your plugin and re-install to get release 2.1.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/raguay/DropboxConnect/issues/4#issuecomment-471862076, or mute the thread https://github.com/notifications/unsubscribe-auth/AT2l94N2PQPR4aLifVps0mKPXZ0XiTmXks5vVzpNgaJpZM4SwpIa .

-- Martin Bulla

NIOZ Royal Netherlands Institute for Sea Research Department of Coastal Systems, Landsdiep 4, 1797 SZ 't Horntje (Texel), NL

http://www.metawad.nl http://www.nioz.nl/waddenresearch Max Planck Institute for Ornithology Department of Behavioural Ecology & Evolutionary Genetics Eberhard Gwinner Strasse 7, 82319 Seewiesen, DE

Czech University of Life Sciences Prague Faculty of Environmental Sciences, Kamýcká 129, 16521 Prague, CZ

+49 152 297 476 95 <01522%209747695> http://orn-mpg.academia.edu/MartinBulla