• oscampo

    Thanks @mikael . By the while is a starting point.

    posted in Pythonista read more
  • oscampo

    Hi!
    I’m a drawing and sketching enthusiast and use apps like Procreate for drawing and painting with Apple pencil 2nd generation. This pencil not have a low battery alert, so it's frustrating when you are in the middle of a drawing a suddenly, your pencil stops working because the battery is drained.
    In the Apple community, the only solution for this disappointing issue is to maintain attached the pencil to magnetic side of the iPad to ensure it is charging...(not an excellent solution for me)
    So, I would like to write a widget or an app that runs in the background while my drawing session, and it checks the battery status of my pencil and alerts me when it is on a critical level

    I was searching for some documentation about how to check the battery status of Apple Pencil via Pythonista, but I only found an example to monitor the iPad battery status. So, please anybody has an idea of suggestions about how to do this for battery pencil?

    posted in Pythonista read more
  • oscampo

    @JonB Thank you!
    This worked fine

    posted in Pythonista read more
  • oscampo

    Thanks @JonB !
    I changed the pkg_resources, forced pythonista to quit and started again, but now, after the "Querying PyPI" message, this is the traceback:

    Querying PyPI ...
    stash: <class 'xmlrpclib.Fault'>: <Fault 1: "<type 'exceptions.TypeError'>:datetime.datetime(2017, 1, 25, 23, 9, 38, 332239) is not JSON serializable">

    Traceback (most recent call last):
    File "/private/var/mobile/Containers/Shared/AppGroup/2E09C07F-FFBD-4F5A-909A-C6BF44699985/Pythonista3/Documents/site-packages/stash/system/shruntime.py", line 498, in exec_py_file
    exec code in namespace, namespace
    File "site-packages/stash/bin/pip.py", line 1208, in <module>
    repository.install(pkg_name, ver_spec)
    File "site-packages/stash/bin/pip.py", line 940, in install
    archive_filename, pkg_info = self.download(pkg_name, ver_spec)
    File "site-packages/stash/bin/pip.py", line 911, in download
    downloads = self.pypi.release_urls(pkg_name, hit)
    File "/var/containers/Bundle/Application/D0BD4051-36A4-4B3F-8BF7-3681CA38C7E3/Pythonista3.app/Frameworks/Py2Kit.framework/pylib/xmlrpclib.py", line 1244, in call
    return self.__send(self.__name, args)
    File "/var/containers/Bundle/Application/D0BD4051-36A4-4B3F-8BF7-3681CA38C7E3/Pythonista3.app/Frameworks/Py2Kit.framework/pylib/xmlrpclib.py", line 1603, in __request
    verbose=self.__verbose
    File "/var/containers/Bundle/Application/D0BD4051-36A4-4B3F-8BF7-3681CA38C7E3/Pythonista3.app/Frameworks/Py2Kit.framework/pylib/xmlrpclib.py", line 1284, in request
    return self.single_request(host, handler, request_body, verbose)
    File "/var/containers/Bundle/Application/D0BD4051-36A4-4B3F-8BF7-3681CA38C7E3/Pythonista3.app/Frameworks/Py2Kit.framework/pylib/xmlrpclib.py", line 1317, in single_request
    return self.parse_response(response)
    File "/var/containers/Bundle/Application/D0BD4051-36A4-4B3F-8BF7-3681CA38C7E3/Pythonista3.app/Frameworks/Py2Kit.framework/pylib/xmlrpclib.py", line 1494, in parse_response
    return u.close()
    File "/var/containers/Bundle/Application/D0BD4051-36A4-4B3F-8BF7-3681CA38C7E3/Pythonista3.app/Frameworks/Py2Kit.framework/pylib/xmlrpclib.py", line 801, in close
    raise Fault(**self._stack[0])
    Fault: <Fault 1: "<type 'exceptions.TypeError'>:datetime.datetime(2017, 1, 25, 23, 9, 38, 332239) is not JSON serializable">

    posted in Pythonista read more
  • oscampo

    @JonB with any package that I try to install

    posted in Pythonista read more
  • oscampo

    @JonB following is the full traceback:

    Traceback (most recent call last):
    File "/private/var/mobile/Containers/Shared/AppGroup/2E09C07F-FFBD-4F5A-909A-C6BF44699985/Pythonista3/Documents/site-packages/stash/system/shruntime.py", line 498, in exec_py_file
    exec code in namespace, namespace
    File "site-packages/stash/bin/pip.py", line 1205, in <module>
    ensure_pkg_resources() # install pkg_resources if needed
    File "site-packages/stash/bin/pip.py", line 287, in ensure_pkg_resources
    import pkg_resources
    File "/private/var/mobile/Containers/Shared/AppGroup/2E09C07F-FFBD-4F5A-909A-C6BF44699985/Pythonista3/Documents/site-packages/pkg_resources/init.py", line 72, in <module>
    import packaging.requirements
    File "/private/var/mobile/Containers/Shared/AppGroup/2E09C07F-FFBD-4F5A-909A-C6BF44699985/Pythonista3/Documents/site-packages/packaging/requirements.py", line 59, in <module>
    MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
    TypeError: call() takes exactly 2 arguments (1 given)
    [~/Documents]$

    posted in Pythonista read more
  • oscampo

    @JonB AnyPackage is just any package (without quotes).

    posted in Pythonista read more
  • oscampo

    Toaday I tried to install a package via pip inside StaSH, but I received the following error (in Pythonista v3.1):
    [~/Documents]$ pip install 'AnyPackage'
    stash: <type 'exceptions.TypeError'>: call() takes exactly 2 arguments (1 given)

    I tried updating stash and also uninstalling it, but the result is the same. Please anybody have the same performance or have some idea to solve this problem?
    Thanks in advance.

    posted in Pythonista read more
  • oscampo

    @dgelessus yay! thanks

    posted in Pythonista read more
  • oscampo

    @bennr01 thanks, but the StaSH gh commands only admit fork, pull, and create repos, not clonning

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!