• ihf

    Thank you!

    posted in Pythonista read more
  • ihf

    I was going to play with asyncio but didn't get far:

    import asyncio
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/var/containers/Bundle/Application/C1B2B29C-77ED-496F-8E3F-47352515D93C/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/asyncio/init.py", line 22, in <module>
    from .base_events import *
    File "/var/containers/Bundle/Application/C1B2B29C-77ED-496F-8E3F-47352515D93C/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/asyncio/base_events.py", line 18, in <module>
    import concurrent.futures
    File "/private/var/mobile/Containers/Shared/AppGroup/B86CEE4E-E4A9-4BB4-9CA7-6E13BDA2C2A4/Pythonista3/Documents/site-packages/concurrent/futures/init.py", line 8, in <module>
    from concurrent.futures._base import (FIRST_COMPLETED,
    File "/private/var/mobile/Containers/Shared/AppGroup/B86CEE4E-E4A9-4BB4-9CA7-6E13BDA2C2A4/Pythonista3/Documents/site-packages/concurrent/futures/_base.py", line 381
    raise exception_type, self._exception, self._traceback
    ^
    SyntaxError: invalid syntax

    posted in Pythonista read more
  • ihf

    Oddly ther is a directory with that name but it is empty. I tried putting a copy of Calculator.py in there and I get the same error from Synchronator for the same file. ??

    posted in Pythonista read more
  • ihf

    I did what you said and the Print(entry_path) shows Examples/Calculator.py/Calculator.py

    AFAICT that file is not on the iPhone nor is it in the Dropbox backup.

    I can replace everything on the iPhone with the Dropbox backup (which is from the iPad) but I don't know of an option in Synchronator to do that.

    posted in Pythonista read more
  • ihf

    pdb.pm() shows:

    pdb.pm()
    /private/var/mobile/Containers/Shared/AppGroup/A7D4C56F-A77A-4D88-87AC-A52286C0CF04/Pythonista3/Documents/site-packages/dropbox/dropbox.py(296)request()
    -> user_message_locale)
    (Pdb)

    I thought it was possible for me to sync my iPhone and iPad to the same Dropbox directory so that any changes to one would be reflected in changes to the other but perhaps I can't do that?

    posted in Pythonista read more
  • ihf

    Can anyone please tell me what the problem is here or suggest how I can debug it? Synchronator (v1.11) gets to this point after downloading some files and then fails with the api error.

    posted in Pythonista read more
  • ihf

    I tried running pawk.py in Stash in various ways but nothing produces an output (interestingly, no errors either).

    However, I installed pawk in site-packages-2 using Stash while running Python v2.7. When I tried doing the install running v3.6, I got:

    [~/Documents]$ pip install python-awk
    <class 'ImportError'>: This package should not be accessible on Python 3 Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.

    posted in Pythonista read more
  • ihf

    This is what my console looks like:

    [~/Documents]$ pip install python-awk
    Querying PyPI ...
    Downloading package ...
    Opening: https://files.pythonhosted.org/packages/63/2b/bd27d449ba2f102d9b2b8dfe09446abeebcd292d10ce264c4b0660155af9/python-awk-0.0.5.tar.gz

    Save as: /private/var/mobile/Containers/Data/Application/7864CBEC-94B6-4103-AA16-C07C89C5C69C/tmp//python-awk-0.0.5.tar.gz (5424 bytes)
    5424 [100.00%]
    Extracting archive file ...
    Archive extracted.
    Running setup file ...
    Package installed: python-awk
    Installing dependency: jtutils
    Querying PyPI ...
    Downloading package ...
    Opening: https://files.pythonhosted.org/packages/e7/66/e17c5c7cf390e4b45c2ffc2adb3ad6e575ab0ff0bc647061f43c6fb2001e/jtutils-0.0.6.tar.gz

    Save as: /private/var/mobile/Containers/Data/Application/7864CBEC-94B6-4103-AA16-C07C89C5C69C/tmp//jtutils-0.0.6.tar.gz (6706 bytes)
    6706 [100.00%]
    Extracting archive file ...
    Archive extracted.
    Running setup file ...
    Package installed: jtutils
    Dependency available in Pythonista bundle : requests
    Dependency available in Pythonista bundle : beautifulsoup4
    Installing dependency: argparse
    Querying PyPI ...
    Downloading package ...
    Opening: https://files.pythonhosted.org/packages/f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl

    Save as: /private/var/mobile/Containers/Data/Application/7864CBEC-94B6-4103-AA16-C07C89C5C69C/tmp//argparse-1.4.0-py2.py3-none-any.whl (23000 bytes)
    23000 [100.00%]
    Installing wheel: argparse-1.4.0-py2.py3-none-any.whl...
    Extracting wheel..
    Extraction finished, running handlers...
    Running handler 'WHEEL information checker'...
    Wheel generated by: bdist_wheel (0.24.0)
    Running handler 'dependency handler'...
    Running handler 'top_level.txt installer'...
    Copying /private/var/mobile/Containers/Data/Application/7864CBEC-94B6-4103-AA16-C07C89C5C69C/tmp/wheel_tmp/argparse-1.4.0-py2.py3-none-any.whl/argparse.py -> /private/var/mobile/Containers/Shared/AppGroup/B86CEE4E-E4A9-4BB4-9CA7-6E13BDA2C2A4/Pythonista3/Documents/site-packages-2/argparse.py
    Running handler 'console_scripts installer'...
    No entry_points.txt found, skipping.
    Cleaning up...
    Package installed: argparse
    Dependency available in Pythonista bundle : six
    [~/Documents]$ pawk
    stash: pawk: command not found

    [~/Documents]$ cd site-packages-2
    [site-packages-2]$ cd pawk
    [pawk]$ pawk
    import: command not found
    from: command not found
    if: command not found
    fix_broken_pipe(): command not found
    pawk.pawk(): command not found

    pawk is meant to be run from the command line.

    posted in Pythonista read more
  • ihf

    I was trying to see if I could get pawk working. I installed it with pip install python-awk. However I can't figure out how to run it, probably under Stash.

    Awk is a very useful tool and I was hoping I could get it working in Pythonista.

    posted in Pythonista read more
  • ihf

    I tried deleting Synchronator and starting all over again on the iPhone following the directions above. Synchronator starts and begins Updating from Dropbox, downloads a dozen files and then the script dies. The traceback is as follows:

    Traceback (most recent call last):
    File "/private/var/mobile/Containers/Shared/AppGroup/A7D4C56F-A77A-4D88-87AC-A52286C0CF04/Pythonista3/Documents/Synchronator/Synchronator.py", line 403, in <module>
    check_remote(dbx, state)
    File "/private/var/mobile/Containers/Shared/AppGroup/A7D4C56F-A77A-4D88-87AC-A52286C0CF04/Pythonista3/Documents/Synchronator/Synchronator.py", line 282, in check_remote
    state.execute_delta(dbx)
    File "/private/var/mobile/Containers/Shared/AppGroup/A7D4C56F-A77A-4D88-87AC-A52286C0CF04/Pythonista3/Documents/Synchronator/Synchronator.py", line 152, in execute_delta
    self.__process_remote_entries(results.entries, current_remote_file_paths)
    File "/private/var/mobile/Containers/Shared/AppGroup/A7D4C56F-A77A-4D88-87AC-A52286C0CF04/Pythonista3/Documents/Synchronator/Synchronator.py", line 242, in __process_remote_entries
    self.download_remote(dbx, entry_path, '-- Not Found Locally')
    File "/private/var/mobile/Containers/Shared/AppGroup/A7D4C56F-A77A-4D88-87AC-A52286C0CF04/Pythonista3/Documents/Synchronator/Synchronator.py", line 139, in download_remote
    result = dbx.files_download_to_file(path, os.path.join('/', path))
    File "/private/var/mobile/Containers/Shared/AppGroup/A7D4C56F-A77A-4D88-87AC-A52286C0CF04/Pythonista3/Documents/site-packages/dropbox/base.py", line 1175, in files_download_to_file
    None,
    File "/private/var/mobile/Containers/Shared/AppGroup/A7D4C56F-A77A-4D88-87AC-A52286C0CF04/Pythonista3/Documents/site-packages/dropbox/dropbox.py", line 296, in request
    user_message_locale)
    dropbox.exceptions.ApiError: ApiError('da9c4c00582c7cfa99818f98393be092', DownloadError('path', LookupError('not_found', None)))

    I would really like to get this working (reliably) on the iPad and iPhone. Can someone please help?

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!