• Skeo

    @JonB Thanks. I missed that post.

    posted in Pythonista read more
  • Skeo

    Seem to me the split-screen toggle is broken in the beta.

    I had a full screen console and I could swipe left and right between it and the editor, then I pushed the split screen button and now swiping left/right transitions between either the editor with the file browser on the left or the editor with the (narrow) console on the right. Problem is, the split screen button seems to have disappeared now and I can't for the life of me figure out how to get the full screen console back.

    Just went and checked in version 2 and the toggle remains after switching to split-screen. In the beta it disappears and only the help button remains at the top left of the console pane.

    posted in Pythonista read more
  • Skeo

    @JonB It occurred to me I could run it in python2 now that the beta supports both. Then it occurred to me that I could run the old dropbox module using python2 (until dropbox deprecate it at least), so I tried that and got it working. Win. Thanks for your help.

    btw, I tried pip install dropbox in stash under 2.7, but it didn't work. It seemed to complete the install, but I still got the same errors from the dropbox sync script (under 3.5), I'm guessing pythonista keeps seperate modules for the two versions or something? I'm not too fussed because I have a working solution now, but I figured it was worth mentioning.

    posted in Pythonista read more
  • Skeo

    @JonB I haven't been able to get stash to work. Fixed a bunch of python3 incompatibilities by running 2to3 over it, but I still can't get a functional command line from it.

    posted in Pythonista read more
  • Skeo

    @dgelessus @omz Apologies for my delays replies. Been very busy.
    Here is my traceback error for the dropbox module

    Getting request token...
    >>> import traceback
    >>> traceback.print_last()
    Traceback (most recent call last):
      File "/var/containers/Bundle/Application/A9B030F9-D4F9-4655-98F2-138229441753/Pythonista3.app/Frameworks/PythonistaKit3.framework/pylib/site-packages/dropbox/session.py", line 325, in _parse_token
        key = params['oauth_token'][0]
    KeyError: 'oauth_token'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/private/var/mobile/Containers/Shared/AppGroup/E1A188D0-4D1B-4343-8EB4-AB6ECC41AA73/Pythonista3/Documents/dropbox_sync/dropboxlogin.py", line 55, in <module>
        main()
      File "/private/var/mobile/Containers/Shared/AppGroup/E1A188D0-4D1B-4343-8EB4-AB6ECC41AA73/Pythonista3/Documents/dropbox_sync/dropboxlogin.py", line 50, in main
        dropbox_client = get_client()
      File "/private/var/mobile/Containers/Shared/AppGroup/E1A188D0-4D1B-4343-8EB4-AB6ECC41AA73/Pythonista3/Documents/dropbox_sync/dropboxlogin.py", line 40, in get_client
        access_token = get_access_token()
      File "/private/var/mobile/Containers/Shared/AppGroup/E1A188D0-4D1B-4343-8EB4-AB6ECC41AA73/Pythonista3/Documents/dropbox_sync/dropboxlogin.py", line 32, in get_access_token
        request_token = get_request_token()
      File "/private/var/mobile/Containers/Shared/AppGroup/E1A188D0-4D1B-4343-8EB4-AB6ECC41AA73/Pythonista3/Documents/dropbox_sync/dropboxlogin.py", line 21, in get_request_token
        request_token = sess.obtain_request_token()
      File "/var/containers/Bundle/Application/A9B030F9-D4F9-4655-98F2-138229441753/Pythonista3.app/Frameworks/PythonistaKit3.framework/pylib/site-packages/dropbox/session.py", line 222, in obtain_request_token
        self.request_token = self._parse_token(response.read())
      File "/var/containers/Bundle/Application/A9B030F9-D4F9-4655-98F2-138229441753/Pythonista3.app/Frameworks/PythonistaKit3.framework/pylib/site-packages/dropbox/session.py", line 327, in _parse_token
        raise ValueError("'oauth_token' not found in OAuth request.")
    ValueError: 'oauth_token' not found in OAuth request.
    

    It appears to be a simple case of using a bytestring as the dictionary lookup key, but according to this, there are more issues than just that and ultimately dropbox module v1 is incompatible with python3. The new SDK however (module v2) is compatible and backward compatible with old code too, so it should be a simple case of updating the module in pythonista. As I mentioned in my first post, I'm not sure I can do that myself, I've been reading around about installing modules with pipista etc, but it seems like its pretty hit and miss and I don't have heaps of time to spend messing around getting dropbox syncing to work.

    Should I assume that the module will be updated at some point before P3 is released from beta, and I just need to wait? Would it be possible for me to update the module myself? How would one do that?

    posted in Pythonista read more
  • Skeo

    @dgelessus Do you know if there is a way to copy/paste the traceback error from in pythonista or do I just need to type it out by hand into the forum? It was a bunch of levels deep, but I don't have my ipad with my to copy it right now.

    I didn't change any code as I couldn't figure out how to modify the dropbox module that is built in. Clicking on the links in the traceback shows the relevant files in read-only. That's why I posted here asking if updating the module using the new SDK is something I can actually do myself. I assume @omz has this on the to-do list now?

    posted in Pythonista read more
  • Skeo

    Trying to get the dropbox sync script working in P3 and running into OAuth errors. Google is telling my its to do with dropbox not supporting python3 and that I need to install the new SDK https://github.com/dropbox/dropbox-sdk-python

    Is this something I can install myself somehow or does pythonista need to be updated?

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!