Errors in provided dropbox_accessor.py by ftrack?
1 1

5 posts in this topic

Hi, 

 

I am trying to run the provided example of the dropbox_accessor.py in the docs but getting error upon execution. All ftrack and dropbox module load fine. There is some problem with None in self.client of the dropbox_accessor.py

 

When I try to run following:

 
python interpreter:
 
> access_token = u'6oxM_7NTdfMAAAAAAAAkadsfasdgfasgasdg...'
> accessor = DropboxAccessor(access_token)
 

 I get Result:

 

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "dropbox_accessor.py", line 52, in __init__
    self.client.connect(access_token)
AttributeError: 'NoneType' object has no attribute 'connect'
 
In the dropbox_accessor.py we find self.client = None ...That seems to be the source for the error. 
 
Any ideas of how to exectute the example code in dropbox_accessor.py provided by ftrack without errors? 
What am I missing?
 
Excerpt from the dropbox_accessor.py :
...
class DropboxAccessor(ftrack.Accessor):
    '''Provide Dropbox access to a location.'''
 
    def __init__(self, access_token, **kwargs):
        self.client = None
        self.client.connect(access_token)
        super(DropboxAccessor, self).__init__(**kwargs)
 
 
 
thanks Peter

Share this post


Link to post
Share on other sites

Never mind. I got it sorted. I adjusted your code by taking out self.client.connect(access_token) and putting new_client instead.

 

from dropbox.client import DropboxClientnew_client = DropboxClient('6oxM_7NTdfMHJGjhgkjhfkjgfhg....')class DropboxAccessor(ftrack.Accessor):    '''Provide Dropbox access to a location.'''    def __init__(self, access_token, **kwargs):        self.client = new_client        # self.client.connect(access_token)        super(DropboxAccessor, self).__init__(**kwargs)

...

 

Share this post


Link to post
Share on other sites
On December 15, 2015 at 3:31 PM, Mattias Lagergren said:

We're working on a new version of the dropbox accessor as a standalone open repository, with their new api. It shouldn't be too far away

Hi Mattias,

Any news on that accessor?

 

Cheers,
diogo

Share this post


Link to post
Share on other sites

Hi Diogo,

We've halted the development of the dropbox accessor, and I'm not sure on the plans to pick it up. For the project we intended it for it turned out that it was better to just use an ordirnary disk accessor and have the dropbox folder mounted.

With Dropbox project infinite being in development there is even less need of a accessor using the Dropbox API, see https://blogs.dropbox.com/business/2016/04/announcing-project-infinite/

What do you think, would mounting dropbox and using a disk accessor be a viable option for you - or would you still need an accessor that utilises the API?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
1 1