omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. rhithyn
    3. Posts

    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.


    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by rhithyn

    • Bug in editor.make_new_path() when using absolute path.

      I think I've found a bug with editor.make_new_file. If an absolute path is given, it will just crash with an "undeclared variable before use" error.

      Stack dump:

      Traceback (most recent call last):
      File "_ctypes/callbacks.c", line 234, in 'calling callback function'
      File "/var/containers/Bundle/Application/97D3CA1E-BD16-4F1A-B952-153773020E29/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/objc_util.py", line 1064, in OMMainThreadDispatcher_invoke_imp
      retval = func(*args, **kwargs)
      File "/var/containers/Bundle/Application/97D3CA1E-BD16-4F1A-B952-153773020E29/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/editor.py", line 124, in make_new_file
      full_path = os.path.join(doc_path, new_name)
      UnboundLocalError: local variable 'doc_path' referenced before assignment

      If I get the path of the current editor file, and pass it into make_new_file (which should make a number-incremented file in the same folder), it fails.

      I have an idea for a workaround (parsing the path down to the "Documents" folder and using that path) but wanted to give a heads up about this bug.

      posted in Pythonista
      rhithyn
      rhithyn