This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Patrick Liu
Recipients Patrick Liu
Date 2019-12-28.09:56:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1577526962.17.0.0234769232218.issue39147@roundup.psfhosted.org>
In-reply-to
Content
When I run the python script with root privilege, it can clone the repo successfully but with the error message as follow.
However, it runs correctly with normal user.
Why it cannot find the html file? Thanks.

Python 3.7.4 (default, Aug 13 2019, 20:35:49) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from git_clone import git_clone
>>> git_clone('https://github.com/android9527/android9527.github.io')
13472.0 KB, 13574 KB/s, 0.99 seconds passed         Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/anaconda3/lib/python3.7/site-packages/git_clone/git_clone.py", line 53, in git_clone
    f.extractall(path + '/.')
  File "/root/anaconda3/lib/python3.7/zipfile.py", line 1619, in extractall
    self._extract_member(zipinfo, path, pwd)
  File "/root/anaconda3/lib/python3.7/zipfile.py", line 1673, in _extract_member
    open(targetpath, "wb") as target:
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/fit-Knowledgezoo/test/android9527.github.io-master/2019/01/24/2019-01-24-Java 重入锁 synchronized /index.html'
>>> exit()
History
Date User Action Args
2019-12-28 09:56:02Patrick Liusetrecipients: + Patrick Liu
2019-12-28 09:56:02Patrick Liusetmessageid: <1577526962.17.0.0234769232218.issue39147@roundup.psfhosted.org>
2019-12-28 09:56:02Patrick Liulinkissue39147 messages
2019-12-28 09:56:01Patrick Liucreate