OSError: [Errno 2] No such file or directory, in_execute_child raise child_exception - linux

I am new to Python and Linux, I am getting an error
File "usr/lib/python2.7/subprocess.py, line 1335, in_execute_child
=======
raise child_exception"
=======
OSERROR: [Error 2] No Such File or Directory
=======
This image shows the commands and error that I am facing:

Related

I need to create a zip file using python. But unfortunately my code is not working.Is there any error on my part?

**So i wish to create a zip file named new.zip using python which also contains a text file called sample.txt. But after running the necessary code on my python editor i get the error as :
Traceback (most recent call last):
File "C:/Users/User/PycharmProjects/PYTHON_CODE/creatingZipFile.py", line 5, in
newZip.write('sample.txt', compress_type=zipfile.ZIP_DEFLATED)
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\zipfile.py", line 1713, in write
zinfo = ZipInfo.from_file(filename, arcname)
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\zipfile.py", line 506, in from_file
st = os.stat(filename)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'sample.txt'
My python code is as below :
import os, zipfile
os.chdir("F:\\")
newZip = zipfile.ZipFile('new.zip', 'a')
newZip.write('sample.txt', compress_type=zipfile.ZIP_DEFLATED)
newZip.close()
PLEASE SOMEONE HELP ME REGARDING THIS ISSUE.**
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'sample.txt'
will occur if the file is not present in the specified path, can you check if sample.txt is actually present in the path F:\sample.txt

How to fix FileNotFoundError [Errno 2] File does not exist in Pyinstaller

I want to build an exe file using pyinstaller. Unfortunately, I cannot figure out, how to fix the following problem, which comes from Pandas library:
File "pandas\_libs\parsers.pyx", line 387, in
pandas._libs.parsers.TextReader.__cinit__
File "pandas\_libs\parsers.pyx", line 705, in
pandas._libs.parsers.TextReader._setup_parser_source
FileNotFoundError: [Errno 2] File b'data/test/file1.csv' does not exist:
b'data/test/file1.csv'
I've tried to include this folder to datas, but it does not help. All source files and data folder are located in one folder.
files_to_add= [
( 'data', 'data' )
]
a = Analysis(['my_script.py'],
pathex=['C:\\Users\\...'],
binaries=[],
datas=files_to_add,

Mac: saving .exe to PATH for selenium web driver

I am not a professional developer... trying to save chromedriver to PATH variable so i can use selenium with python.
following this page for instructions on this page
https://medium.com/#himanshuagarwal1395/setting-up-environment-variables-in-macos-sierra-f5978369b255
I open bash_profile with nano .bash_profile
I made a directory user/mysusername/selenium/
then saved my file chromedriver in this directory with the python script i and using selenium with.
I have tried to save my path to the chromedriver.exe file as such
export PATH="/User/baldoa/selenium/ChromeDriver.exe:$PATH"
I follow the steps to save appropriately according to this page. I am not sure
i still get the following error :
a8206602016e:selenium baldoa$ python destruction.py
Traceback (most recent call last):
File "/Users/baldoa/.pyenv/versions/3.6.5/lib/python3.6/site-packages/selenium
/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/Users/baldoa/.pyenv/versions/3.6.5/lib/python3.6/subprocess.py", line
709, in __init__
restore_signals, start_new_session)
File "/Users/baldoa/.pyenv/versions/3.6.5/lib/python3.6/subprocess.py", line
1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'C:/users/baldoa
/selenium/chromedriver.exe': 'C:/users/baldoa/selenium/chromedriver.exe'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "destruction.py", line 7, in <module>
browser = webdriver.Chrome("""C:/users/baldoa/selenium/chromedriver.exe""")
File "/Users/baldoa/.pyenv/versions/3.6.5/lib/python3.6/site-packages/selenium
/webdriver/chrome/webdriver.py", line 68, in __init__
self.service.start()
File "/Users/baldoa/.pyenv/versions/3.6.5/lib/python3.6/site-packages/selenium
/webdriver/common/service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe'
executable needs to be in PATH. Please see https://sites.google.com
/a/chromium.org/chromedriver/home

Problems downloading something-something datasets

I am now learning video recognition and want to use the dataset something-something published by twentybn(https://www.twentybn.com/datasets/something-something).
I followed the downloading and installing tips in https://github.com/TwentyBN/twentybn-dl, which told me to download the dataset in the virtual environment.
When process reached 'extract-chunks' step, something wrong occurred like
Using: '/home/hanzp/sth_sth' as storage.
Will now extract chunks for: 'something-something'
100%|████████████████████████████████▉| 5.33M/5.33M [19:19<00:00, 19.4Kimages/s]Exception in thread background thread for pid 30664:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/home/hanzp/twentybn-dl/lib/python3.5/site-packages/sh.py", line 1540, in wrap
fn(*args, **kwargs)
File "/home/hanzp/twentybn-dl/lib/python3.5/site-packages/sh.py", line 2459, in background_thread
handle_exit_code(exit_code)
File "/home/hanzp/twentybn-dl/lib/python3.5/site-packages/sh.py", line 2157, in fn
return self.command.handle_command_exit_code(exit_code)
File "/home/hanzp/twentybn-dl/lib/python3.5/site-packages/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_2:
RAN: /bin/tar xvz
STDOUT:
20bn-something-something-v1/16296/00045.jpg
20bn-something-something-v1/16296/00019.jpg
20bn-something-something-v1/16296/00003.jpg
20bn-something-something-v1/16296/00062.jpg
20bn-something-something-v1/16296/00057.jpg
20bn-something-something-v1/16296/00014.jpg
20bn-something-something-v1/16296/00040.jpg
20bn-something-something-v1/16296/00011.jpg
20bn-something-something-v1/16296/00021.jpg
20bn-something-something-v1/16296/00008.jpg
20bn-something-something-v1/16296/00027.jpg
20bn-something-something-v1/16296/00028.jpg
20bn-something-something-v1/16296/00050.jpg
20bn-something-something-v1/16296/00034.jpg
20bn-something-something-v1/16296/00063.jpg
20bn-something-something-v1/16296/00007.jpg
20bn-something-something-v1/16296/00009.jpg
20... (137762091 more, please see e.stdout)
STDERR:
/bin/tar: 20bn-something-something-v1/27730:无法 mkdir: 过多的连接
/bin/tar: 20bn-something-something-v1/27730/00043.jpg:无法 open: 没有那个文件或目录
/bin/tar: 20bn-something-something-v1/27730:无法 mkdir: 过多的连接
/bin/tar: 20bn-something-something-v1/27730/00066.jpg:无法 open: 没有那个文件或目录
/bin/tar: 20bn-something-something-v1/27730:无法 mkdir: 过多的连接
/bin/tar: 20bn-something-something-v1/27730/00049.jpg:无法 open: 没有那个文件或目录
/bin/tar: 20bn-something-something-v1/27730:无法 mkdir: 过多的连接
/bin/tar: 20bn-something-something-v1/27730/00001.jpg:无法 open: 没有那个文件或目录
/bin/tar: 20bn-something-something-v1/27730:无法 mkdir... (271684964 more, please see e.stderr)
100%|█████████████████████████████████| 5.33M/5.33M [19:26<00:00, 4.57Kimages/s]
Traceback (most recent call last):
File "/home/hanzp/twentybn-dl/bin/twentybn-dl", line 6, in <module>
main()
File "/home/hanzp/twentybn-dl/lib/python3.5/site-packages/twentybn_dl/cli.py", line 108, in main
extract_chunks(d)
File "/home/hanzp/twentybn-dl/lib/python3.5/site-packages/twentybn_dl/cli.py", line 49, in extract_chunks
d.extract_chunks()
File "/home/hanzp/twentybn-dl/lib/python3.5/site-packages/twentybn_dl/schema.py", line 100, in extract_chunks
extract_chunks(self.chunk_paths, self.jpegs, self.storage)
File "/home/hanzp/twentybn-dl/lib/python3.5/site-packages/twentybn_dl/extract.py", line 31, in extract_chunks
for line in process:
File "/home/hanzp/twentybn-dl/lib/python3.5/site-packages/sh.py", line 863, in next
self.wait()
File "/home/hanzp/twentybn-dl/lib/python3.5/site-packages/sh.py", line 792, in wait
self.handle_command_exit_code(exit_code)
File "/home/hanzp/twentybn-dl/lib/python3.5/site-packages/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_2:
RAN: /bin/tar xvz
STDOUT:
20bn-something-something-v1/16296/00045.jpg
20bn-something-something-v1/16296/00019.jpg
20bn-something-something-v1/16296/00003.jpg
20bn-something-something-v1/16296/00062.jpg
20bn-something-something-v1/16296/00057.jpg
20bn-something-something-v1/16296/00014.jpg
20bn-something-something-v1/16296/00040.jpg
20bn-something-something-v1/16296/00011.jpg
20bn-something-something-v1/16296/00021.jpg
20bn-something-something-v1/16296/00008.jpg
20bn-something-something-v1/16296/00027.jpg
20bn-something-something-v1/16296/00028.jpg
20bn-something-something-v1/16296/00050.jpg
20bn-something-something-v1/16296/00034.jpg
20bn-something-something-v1/16296/00063.jpg
20bn-something-something-v1/16296/00007.jpg
20bn-something-something-v1/16296/00009.jpg
20... (137762091 more, please see e.stdout)
STDERR:
/bin/tar: 20bn-something-something-v1/27730:无法 mkdir: 过多的连接
/bin/tar: 20bn-something-something-v1/27730/00043.jpg:无法 open: 没有那个文件或目录
/bin/tar: 20bn-something-something-v1/27730:无法 mkdir: 过多的连接
/bin/tar: 20bn-something-something-v1/27730/00066.jpg:无法 open: 没有那个文件或目录
/bin/tar: 20bn-something-something-v1/27730:无法 mkdir: 过多的连接
/bin/tar: 20bn-something-something-v1/27730/00049.jpg:无法 open: 没有那个文件或目录
/bin/tar: 20bn-something-something-v1/27730:无法 mkdir: 过多的连接
/bin/tar: 20bn-something-something-v1/27730/00001.jpg:无法 open: 没有那个文件或目录
/bin/tar: 20bn-something-something-v1/27730:无法 mkdir... (271684964 more, please see e.stderr)
Maybe i use chinese environment in my ubuntu. The chinese part is
can't mkdir: too much connection
can't open: no such file or directory
Actually i have successfully installed 60k videos but the number of total videos is 100k.
Anyone knew this dataset have met the same problem? Or anyone knew how to do with this error?
Really thanks
I myself have solved this problem. My translation may be wrong that the actual chinese part is 'can't mkdir: too many links'. That is the key that in my ubuntu system only 60k subfolder is permitted in each folder, so this error occurred. I used another computer and downloaded and extracted the dataset successfully.

Unable to launch opscenter due to error: Permission denied: './conf/definitions/opscenter_defs.tar.gz'

When I start OpsCenter, I get following error message:
File "build/lib/python2.6/site-packages/opscenterd/Definitions.py", line 271, in updateFiles
File "/usr/share/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/internet/defer.py", line 1018, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/share/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/python/failure.py", line 349, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "build/lib/python2.6/site-packages/opscenterd/Definitions.py", line 190, in downloadFile
IOError: [Errno 13] Permission denied: './conf/definitions/opscenter_defs.tar.gz'
I installed OpsCenter using DataStaxOpsCenter-5.1.1.2015031808-linux-x64-installer installer on Cent OS 6.6
I did a find / -name opscenter_defs.tar.gz and I can't see this file at all on file system
I ended up installing it on a clean machine.

Resources