omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    StaSH problem

    Pythonista
    3
    12
    6238
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JonB
      JonB last edited by

      please use stashconf py_traceback 1 then try again, and paste the full traceback.

      Is AnyPackage a pypy package, or are you saying you tried it with multiple packages?

      oscampo 1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        Also, try without quotes around AnyPackage.

        oscampo 1 Reply Last reply Reply Quote 0
        • oscampo
          oscampo @JonB last edited by

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

          1 Reply Last reply Reply Quote 0
          • oscampo
            oscampo @JonB last edited by

            @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]$

            1 Reply Last reply Reply Quote 0
            • JonB
              JonB last edited by

              which package specifically are you having issues with

              oscampo 1 Reply Last reply Reply Quote 0
              • oscampo
                oscampo @JonB last edited by

                @JonB with any package that I try to install

                1 Reply Last reply Reply Quote 0
                • JonB
                  JonB last edited by

                  Your pkg_resources install looks bad.

                  [~/Documents]$ rm -rf ~/Documents/site-packages/packaging
                  [~/Documents]$ rm -rf ~/Documents/site-packages/pkg_resources/
                  

                  then force quit pythonista, and try again

                  oscampo 1 Reply Last reply Reply Quote 0
                  • oscampo
                    oscampo @JonB last edited by

                    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">

                    1 Reply Last reply Reply Quote 0
                    • JonB
                      JonB last edited by

                      I would look in your site-packages folder, and delete everything, including stash, and do a fresh stash install. Force quit pythonista and restart. Not sure how you had packaging installed in the wrong location before, but presumably there might be some other issues.

                      oscampo 1 Reply Last reply Reply Quote 0
                      • oscampo
                        oscampo @JonB last edited by

                        @JonB Thank you!
                        This worked fine

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Powered by NodeBB Forums | Contributors