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.
Git or Gist workflow for Pythonista
-
@ywangd said:
A few things to note for your script:
- The GitHub repo address must have an ending
.git
, i.e.https://github.com/Phuket2/Pythonista.git
.
Why is this? Git on desktop doesn't need need thisβ¦
- The GitHub repo address must have an ending
-
@Webmaster4o said:
@ywangd said:
A few things to note for your script:
- The GitHub repo address must have an ending
.git
, i.e.https://github.com/Phuket2/Pythonista.git
.
Why is this? Git on desktop doesn't need need thisβ¦
Because no one has put in a pull request :)
The HTML and ssh protocol do require this, however git for desktop must detect and corrrect this common mistake. - The GitHub repo address must have an ending
-
@ccc, the appex script seems to be broken. I am pretty sure must be due to working copy update. A bunch of file errors. I didn't post them because it's happening on all the repositorys that worked before. I know I haven't changed anything and it doesn't appear the script has changed.
-
@ccc I've not been able to get the script working. This is the end of the traceback:
with open(src, 'rb') as fsrc:
IsADirectoryError: [Errno 21] Is a directory: '/var/mobile/Containers/Shared/AppGroup/379D48B7-C511-4AF4-80DD-2A91B9CD9D2A/File Provider Storage/Pythonista-and-Working-Copy'I'm not an experienced Pythonista user though, so I might have installed the script incorrectly. I added it as a URL extension, is that correct? Do we need to put anything in the Arguments field in the Pythonista extension editor? Could someone describe the correct way to install the script?
-
https://github.com/cclauss/Pythonista-and-Working-Copy Is now working again with the latest version of the Working Copy app. Thanks @Phuket2 and @Utsira for the heads up that it was broken.
-
@ccc , really thanks. Just updated. Working again... But makes life a lot easier. ππππ
-
@ccc I've updated to the latest version of the script. This time I'm seeing a different error. I'm trying to send a
.py
file from Working Copy to Pythonista. Here's the traceback:Traceback (most recent call last):
File "/private/var/mobile/Containers/Shared/AppGroup/FAB03D8A-5598-46CF-A26A-B76EE628E876/Pythonista3/Documents/read_from_working_copy_app.py", line 6, in <module>
import appex, editor, os, shutil
File "/var/containers/Bundle/Application/AE76B4C7-AEC5-4858-9A87-3F2F77424054/Pythonista3.app/Frameworks/PythonistaKit3.framework/pylib/site-packages/editor.py", line 5, in <module>
raise NotImplementedError('Not available in app extension')
NotImplementedError: Not available in app extension -
Sorry @Utsira ... I rolled back the last commit. Please try again.
-
@MartinPacker as we discussed, you can download a repo directly from GitHub and unpack it into Pythonista in 10 lines of Python.
This version does not require Working Copy... https://github.com/cclauss/Ten-lines-or-less/blob/master/read_zipfile_from_github.py
-
@ccc I was wondering if there was a Pythonista 2 version of this script somewhere?
-
Hi,
It appears that the script is broken when I try to import a repository to pythonista (latest version).
It was working some 3/4 weeks ago. Don't know why it has stopped working. I noticed that working copy has been updated in February.Here is the error:
Traceback (most recent call last): File "/private/var/mobile/Containers/Shared/AppGroup/B6AB638B-3B3D-4649-85A1-8E5C6F750259/Pythonista3/Documents/read_from_working_copy_app.py", line 35, in <module> main() File "/private/var/mobile/Containers/Shared/AppGroup/B6AB638B-3B3D-4649-85A1-8E5C6F750259/Pythonista3/Documents/read_from_working_copy_app.py", line 25, in main print(shutil.copy2(srce_path, dest_path)) File "/var/containers/Bundle/Application/7D651543-38E6-46C5-966F-4EEBA2F1A6CC/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/shutil.py", line 253, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "/var/containers/Bundle/Application/7D651543-38E6-46C5-966F-4EEBA2F1A6CC/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/shutil.py", line 100, in copyfile raise SameFileError("{!r} and {!r} are the same file".format(src, dst)) shutil.SameFileError: '/private/var/mobile/Containers/Data/Application/D82E20BF-DAFE-4D17-AA00-9E6B99A79A39/tmp/Pythonista-and-Working-Copy.zip' and '/private/var/mobile/Containers/Data/Application/D82E20BF-DAFE-4D17-AA00-9E6B99A79A39/tmp/Pythonista-and-Working-Copy.zip' are the same file
It works fine with single files.
Can anyone help me please?Thanks in advance,
David -
The last line of the error message seems to indicate that you are trying to copy a file onto itself.
shutil.SameFileError: 'x' and 'x' are the same file
-
Very strange.
Have you tried to import a repository recently? Does this error happens to you? -
I can replicate. A partial fix can be found at https://github.com/cclauss/Pythonista-and-Working-Copy/commit/e090d2fa9015acd5428a6d9130f2ec520dbb528c
-
@ccc thanks for fixing
I confirm that the fix works. Will wait for the unzip automatically feature