• ihf

    Just a guess but is it possible that Apple only permits some of its own actions to run as part of a timed automation with no user interaction from a locked state (and Pythonista is not one of those). Some of Apple's actions (e.g. Execute SSH) work fine but most others do not. I have tried with Scriptable, Pyto, and JSBox actions with no success.

    posted in Pythonista read more
  • ihf

    Oh well, I was hoping I could invoke a Pythonista script on a schedule without intervention but that does not seem possible.

    posted in Pythonista read more
  • ihf

    IOS 14 permits timed automations (Shortcuts which run at a prescribed time) without user intervention for some actions. I tried to run a Pythonista action as part of a timed automation and got the rather strange message which said: "Automation failed. Shortcuts could not open Pythonista. It may not be installed on this device" However if I run the action manually, it works fine. Has anyone tried creating a timed automation and seen the same result?

    posted in Pythonista read more
  • ihf

    That works great. Thanks!

    posted in Pythonista read more
  • ihf

    Were you able to get this working? I have the same requirement (read/write Nextcloud files using WebDAV). I tried installing pyocclient but did not get far. In Stash:

    git clone https://github.com/owncloud/pyocclient.git
    Opening: https://github.com/jsbain/gittle/archive/master.zip
    
    Save as: /private/var/mobile/Containers/Data/Application/9AC95861-856F-4573-AFF0-387BDD5EAF02/tmp//gittle.zip (??? bytes)
    27.7KiB          
    mv: Error: Destination path '/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/site-packages/stash/lib/gittle/gittle' already exists
    Opening: https://github.com/FriendCode/funky/archive/master.zip
    
    Save as: /private/var/mobile/Containers/Data/Application/9AC95861-856F-4573-AFF0-387BDD5EAF02/tmp//funky.zip (??? bytes)
    8.3KiB          
    mv: Error: Destination path '/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/site-packages/stash/lib/funky/funky' already exists
    stash: <class 'ModuleNotFoundError'>: No module named 'urlparse' ```

    posted in Pythonista read more
  • ihf

    I am trying to run a program that is part of piecash and getting:

    /private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/site-packages-3/tzlocal/unix.py:158: UserWarning: Can not find any timezone configuration, defaulting to UTC.
      warnings.warn('Can not find any timezone configuration, defaulting to UTC.')
    stash: <class 'RuntimeError'>: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult https://click.palletsprojects.com/python3/ for mitigation steps.
    
    Additional information: on this system no suitable UTF-8 locales were discovered. This most likely requires resolving by reconfiguring the locale system.```

    posted in Pythonista read more
  • ihf

    Thanks. I suppose I can either put the arguments in a URL or use the clipboard in both directions.
    I guess Ole is no longer maintaining his wonderful creation.

    posted in Pythonista read more
  • ihf

    I’m writing a shortcut which runs a Pythonista script and has arguments. I would prefer not to use the clipboard to send the arguments but I will use it to receive the results. When I execute a script with an argument using the Pythonista action in Shortcuts, My script gives “List out of range“ when it sees sys.arg[1]
    What have I overlooked?

    posted in Pythonista read more
  • ihf

    @ccc Were you making a joke? The use of "bleep" was just a placeholder for ANY module that I attempt to install. It is not a function of what I am installing. It's a problem with pip and stash under Python3 (at least with my environment).

    posted in Pythonista read more
  • ihf

    [~/Documents]$ pip install bleep
    stash: <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.
    Traceback (most recent call last):
      File "site-packages/stash/bin/pip.py", line 976, in __init__
        import xmlrpclib
    ModuleNotFoundError: No module named 'xmlrpclib'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/site-packages/stash/system/shruntime.py", line 546, in exec_py_file
        exec (code, namespace, namespace)
      File "site-packages/stash/bin/pip.py", line 1572, in <module>
        repository = get_repository(requirement, site_packages=site_packages, verbose=ns.verbose)
      File "site-packages/stash/bin/pip.py", line 1433, in get_repository
        return PyPIRepository(site_packages=site_packages, verbose=verbose)
      File "site-packages/stash/bin/pip.py", line 979, in __init__
        import xmlrpc.client as xmlrpclib
      File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/site-packages/xmlrpc/__init__.py", line 7, in <module>
        raise ImportError('This package should not be accessible on Python 3. '
    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.
    [~/Documents]$
    

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!