Error input file does not exist

Following this tutorial, I've created my positive samples but need to merge them now, using mergevec. I downloaded the mergevec.exe binary file provided and got the two required dlls cxcore100.dll ...

Following this tutorial, I’ve created my positive samples but need to merge them now, using mergevec. I downloaded the mergevec.exe binary file provided and got the two required dlls cxcore100.dll and highgui100.dll. However, when I run it like so:

mergevec samples.txt samples.vec

it gives me the error:

ERROR: Input file <filename> does not exist or not readable.

What should I do to fix this? My vec files are fine, because I was able to view them using the opencv_createsamples utility. So I know they’re fine.

asked Apr 7, 2014 at 14:30

user961627's user avatar

user961627user961627

12.2k40 gold badges134 silver badges210 bronze badges

2

I ran into this issue as well and made a python utility that combines .vec files to avoid installing openCV again: https://github.com/wulfebw/mergevec

Hope it helps.

answered Nov 12, 2014 at 3:33

randomcastle's user avatar

1

I was in the same situation as you few days ago so i’ll try to help you out =P.

First of all i am interested to know where you found the mergevec.exe, because it isn’t available to download anymore if i recall. I ask because i think that you might have downloaded an exe compiled on Linux. I had the same error when i tried to execute the mergevec, i had compiled on Ubuntu, on my Windows computer. Even with the 2 dlls.

As i explained it here , The mergevec from Naotoshi was originally made for Unix distribution, so under windows you will encounter a lot of problems. I first tried to do it on windows but i abandonned because it was too complicated and even with a full Cygwin installation i could not compile the mergevec.cpp.

What i advise you to do is to create yourself an Ubuntu virtual machine and to compile your own mergevec.exe. Once done you can copy your vec files in your virtual machine and merge them under Ubuntu. After this you can bring back the merged vec file to Windows if you want (It is better to not run the training under a VM: less computation power).

Here is what i did:

  • Installed VMware player with Ubuntu 14.0.4 (although i don’t recommend it, still some bugs)
  • Installed OpenCV from the sources with TBB. There are a lot of tutorials, but the only one that worked for me is the OPenCV website, they are the more accurate on the libraries you mandatorily need.
  • I downloaded the GitHub classifier training and then I followed the commands given and it worked well.

If you encounter any library problem or OpenCV Installation issue don’t hesitate i went through them too.

Community's user avatar

answered Jun 2, 2014 at 10:07

Lucas's user avatar

LucasLucas

1061 silver badge5 bronze badges

I’ve followed the set up guide up to the enrich phase, and all seems to be working as expected.

When I run the EMR jobs, they fail with the following error:

Exception in thread "main" java.lang.RuntimeException: Error running job
    at com.amazon.elasticmapreduce.s3distcp.S3DistCp.run(Unknown Source)
    at com.amazon.elasticmapreduce.s3distcp.S3DistCp.run(Unknown Source)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
    at com.amazon.elasticmapreduce.s3distcp.Main.main(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:187)
Caused by: org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: hdfs:/tmp/ab1f5ebb-40f1-4ad2-b6fc-295b36cf87a6/files
    at org.apache.hadoop.mapred.FileInputFormat.listStatus(FileInputFormat.java:197)
    at org.apache.hadoop.mapred.SequenceFileInputFormat.listStatus(SequenceFileInputFormat.java:40)
    at org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:208)
    at org.apache.hadoop.mapred.JobClient.writeOldSplits(JobClient.java:1044)
    at org.apache.hadoop.mapred.JobClient.writeSplits(JobClient.java:1036)
    at org.apache.hadoop.mapred.JobClient.access$700(JobClient.java:174)
    at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:952)
    at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:905)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1132)
    at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:905)
    at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:879)
    at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1316)
    at com.amazon.elasticmapreduce.s3distcp.S3DistCp.run(Unknown Source)
    ... 9 more

I have checked my config and all seem well. I can also reproduce this every time I run the job.

The only concern I have is that I’m executing the runner locally (for testing purposes), but should that matter?

I’m raising a ticket in case someone else has the same issue in the future, hoping we can troubleshoot here.

My failed step lists this in the EMR console:

| Elasticity Custom Jar Step | FAILED | 2013-07-28 17:28 EST | 2013-07-28 17:29 EST | /home/hadoop/lib/emr-s3distcp-1.0.jar | - |   --src s3n://analytics-test-etl/processing/ --dest hdfs:///local/snowplow-logs --groupBy .*.([0-9]+-[0-9]+-[0-9]+)-[0-9]+..* --targetSize 128 --outputCodec lzo --s3Endpoint s3.amazonaws.com | 
| Elasticity Custom Jar Step | CANCELLED | - | - | s3://snowplow-hosted-assets/3-enrich/hadoop-etl/snowplow-hadoop-etl-0.3.2.jar |  - |     com.snowplowanalytics.snowplow.enrich.hadoop.EtlJob --hdfs --input_folder hdfs:///local/snowplow-logs --input_format cloudfront --maxmind_file http://snowplow-hosted-assets.s3.amazonaws.com/third-party/maxmind/GeoLiteCity.dat --output_folder s3n://analytics-test-data/events/2013-07-28-17-23-41/ --bad_rows_folder s3n://analytics-test-data/bad-rows/2013-07-28-17-23-41/ | 

I am trying to work out what causes the following error:

Input path does not exist: hdfs:/tmp/ab1f5ebb-40f1-4ad2-b6fc-295b36cf87a6/files
Cannot read file filename??.in. The input file has incorrect formatting or has
been corrupted.
Cannot open file filename??.in. Check spelling and ensure the file is in the
correct directory.

These errors indicates the input file specified by the user does not exist. Check for spelling mistakes, and that Netfabb Simulation has been executed in the correct directory.

File filename?? does not exist. Check the input files are correct and ensure
filename is in the correct directory.

This error message occurs when the specified input, PRM, or STL file cannot be found in the current directory.

Command-line argument *???? was unable to be read. Check input files and ensure
usage is accordance with the user manual.
Cannot read file filename due to error argument in card: *????. Refer to the
user manual for correct spelling and usage.
Cannot read file filename??.in due to error in card: *????. Refer to the user
manual for correct spelling and usage.

These error messages are displayed when an unknown line is read from the input file. This is commonly due to accidentally uncommenting a comment line, typing errors, or using a non-basic text (ANSI or ASCII) format.

Command-line argument ???? was truncated. Correct in the input file and rerun.

This error message indicates one of the control cards has been truncated. Fix the input file and rerun.

Could not read dependent analysis files. The file may be missing, the wrong file
type, or corrupted.

This occurs when one or more files required to run a simulation are missing. For a mechanical analysis, ensure the correct dependent thermal analysis is listed under *DEPE and that the thermal analysis completed correctly.

End of input file filename??.in. One or more input cards are incorrectly 
formatted. Check each card has the correct usage specified by the user manual.

This error indicates the input file read to the end of the file without encountering the *END card, or with one or more formatting errors in prior control cards.

Could not read restart file example.bin. Check the restart file name specified
by *REST.

This error indicates that the .bin file specified by the *REST card is not a valid restart file and may have been corrupted.

PRM file read errors

PRM file example??.prm is not correctly formatted. Ensure the correct file is
being used. The PRM file may have been corrupted and needs to be regenerated.
Cannot read prm file example??.prm. Ensure the correct file is being used. The
PRM file may have been corrupted and needs to be regenerated.

These errors occur when the PRM file in *PBPF is misnamed, corrupt, or not a prm file. Locate the correct file or regenerate the PRM file.

No PRM file specified by the PRM file card *PBPF. Specify at least 1 PRM file
under the *PBPF card.

This error is shown when the *PBPF card is included, but without any PRM files listed.

This PRM file was created by pan2 and is not valid. Regenerate the PRM file
using prm gen.

PRM files must be generated with the prm_gen command, not with the pan or pan2 command. Regenerate the PRM file using the prm_gen command. Refer to Example 1 in the Examples section of this Help or in this manual in the PRM File Generation Execution section.

Zero entries found in example.lsr. Check the .lsr file or the *LSRP settings if
the file was auto-generated.

This error indicates the .lsr file generated during PRM generation is empty. Correct the settings in the *LSRP card and regenerate.

The number of ambient temperatures are not consistent in the PRM files. Ensure
the correct PRM files are being used. You may need to regenerate the PRM files
to ensure the specified temperatures are identical in each file.
The number of lack of fusion temperatures are not consistent in the PRM files.
Ensure the correct PRM files are being used. You may need to regenerate the PRM
files to ensure the specified temperatures are identical in each file.
The number of hot spot temperatures are not consistent in the PRM files. Ensure
the correct PRM files are being used. You may need to regenerate the PRM files
to ensure the specified temperatures are identical in each file.
The interlayer temperatures are not consistent in the PRM files. Ensure the
correct PRM files are being used. You may need to regenerate the PRM files to
ensure the specified temperatures are identical in each file.
The lack of fusion temperatures are not consistent in the PRM files. Ensure the
correct PRM files are being used. You may need to regenerate the PRM files to
ensure the specified temperatures are identical in each file.
The hot spot temperatures are not consistent in the PRM files. Ensure the
correct PRM files are being used. You may need to regenerate the PRM files to
ensure the specified temperatures are identical in each file.

If multiple PRM files with lack of fusion or hotspot data are used and they have not been generated using the identical number and values for interlayer temperatures, lack of fusion temperatures, and hotspot temperatures, one or more of the above errors will be displayed. Check that the correct PRM files have been specified and regenerate any PRM files as necessary.

File example??.prm does not contain any parameter or lack of fusion entries.
Ensure the correct file is being used. The PRM file may have been corrupted and
needs to be regenerated.
File example??.prm does not contain any parameter entries. Ensure the correct
file is being used. The PRM file may have been corrupted and needs to be
regenerated.

These errors indicate that the PRM file does not contain standard PRM data. This may be due to the PRM generation process not completing, the file being corrupted, or accidentally using a non-PRM file.

Number of prm files exceeds 100. Increase the value of *NMAT.

By default a maximum of 100 PRM files may be entered. Use *NMAT to increase this limit.

  • Юбилейный DevConfX пройдет 21-22 июня в Москве. Как всегда — Вы решаете, кто попадет в программу секции Backend — голосуйте за интересные доклады

  • Автор темы

    XTD

  • Дата начала

    11 Июн 2007

Статус
В этой теме нельзя размещать новые ответы.

  • #1

File does not exist, при загрузке файла…

Привет всем!

Есть такая проблема:
Когда загружаю файл стандартным способом:

Отправляю:
<FORM ACTION=»index.php» METHOD=»POST» enctype=»multipart/form-data»>
Выберите файл:<INPUT TYPE=»file» NAME=»myfile» size=»35″>
<INPUT TYPE=»submit» NAME=»submit» VALUE=»Загрузить»>
</FORM>

Принимаю:

PHP:

$myfile = $_FILES["myfile"]["tmp_name"];
$myfile_name = $_FILES["myfile"]["name"];
$myfile_size = $_FILES["myfile"]["size"];
$myfile_type = $_FILES["myfile"]["type"];
    
$uploadfile= "/home/user/public_html/file/".$_FILES["myfile"]["name"];
move_uploaded_file($_FILES["myfile"]["tmp_name"], $uploadfile);

ФАЙЛ ЗАГРУЖАЕТСЯ, вроде все нормально. Но:
(Файл *.jpg) Я потом подгоняю высоту изображения согласно ширине 180 пикс.:

PHP:

$size = @getimagesize($foto);
if ($size[0] > 180){
  if ($size[1]>$size[0]) {$procent=$size[1]/$size[0];$itsize=180*$procent;}
  elseif ($size[1]<$size[0]) {$procent=$size[0]/$size[1];$itsize=180/$procent;}
  elseif ($size[1]==$size[0]) {$itsize=180;};
  }else{
  $itsize=$size[1];
};

<img src=

PHP:

<?php echo $uploadfile; ?>

width=»180″ height=

/>

Так вот я не пойму в чем проблема? Файл загружается в папку на сервере, размер соответствует размеру на локале, а файл не отображается. Если там где должен быть рисунок нажать правой кнопкой мышки/свойства, показывается реальный путь ЮРЛ на изображение. А изображение не отображается ..
Да, изображения размером до двух мегабайт загружаются и отображаются нормально. А вот больше двух мегабайт, НЕТ.

В чем может быть проблема? Может нужно настроить php.ini? Больше выделить памяти, или еще что?

В лог на сервере пишет:
[Mon Jun 11 13:09:14 2007] [error] [client IP] File does not exist: «/home/user/public_html/file/foto.jpg

Буду благодарен за помощь..

  • #2

XTD

Да, изображения размером до двух мегабайт загружаются и отображаются нормально. А вот больше двух мегабайт, НЕТ.

Может нужно настроить php.ini? Больше выделить памяти, или еще что?

  • #3

Ты путаешь локальный путь к файлу и путь, под которым он виден через web.

Фанат


  • #4

о господи
когда же вы диск от веб-сервера отличать научитесь?
у тебя на сайте есть каталог /home/?

  • #5

Я указываю полный путь на сервере…
Да и причем тут путь? Файлы то до 2 метров нормально отображаются.

Я догадываюсь что нужно подстроить php.ini

Только ЧТО?

-~{}~ 11.06.07 16:08:

$_FILES[«myfile»][«name»] — чисто имя файла (БЕЗ ПУТИ)

  • #6

Я догадываюсь что нужно подстроить php.ini

Если догадываешься об этом, то почему не догадываешься посмотреть в мануале?

  • #7

Так что нужно делать-то? В иануале не встречал моей ошибки…

Фанат


  • #8

мля.
то у него путь неправильный, то 2 метра не хватает
когда человек сам не знает, от чего у него происходит ошибка, разговаривать с ним бесполезно.

Фанат


  • #10

http://www.php.net/manual/ru/features.file-upload.php

Фанат


  • #11

Гравицапа
судя по коду, который он привел, у него никакие файлы отображаться не должны.

пусть разберется сначала — что у него там отображается, а потом уже будем ссылки давать

Статус
В этой теме нельзя размещать новые ответы.

In this python tutorial, we will discuss the File does not exist python, and also we will cover these below topics:

  • File does not exist python
  • File does not exist python read CSV
  • Python check if the file does not exist and create
  • File does not exist python exception
  • Python Check If a file exists
  • If the file does not exist python
  • Python file does not exist error
  • ioerror file does not exist python
  • Python if the file does not exists skip
  • Python raise file does not exists

Here, we can see how to check whether file exists in python.

  • In this example, I have imported a module called os.path. The os.path module is used for processing the files from different places in the system.
  • The os.path.exists is used to check the specified path exists or not.
  • The path of the file is assigned as r’C:UsersAdministrator.SHAREPOINTSKYDesktopWorkmobile.txt’. The mobile.txt is the name of the file.

Example:

import os.path
print(os.path.exists( r'C:UsersAdministrator.SHAREPOINTSKYDesktopWorkmobile.txt'))

As the file is not present so the output is returned as False. You can refer to the below screenshot for the output.

File does not exist python
File does not exist python

This is how to fix file not exist error python.

Read, Python program to print pattern.

File does not exist python read CSV

Here, we can see how check file does not exist read CSV in python.

  • In this example, I have used exceptions, So I have taken try block and to check whether the file exists or not.
  • I have opened the file with .csv extension, if condition is true it should print File present as the output.
  • If the file is not found, the except is FileNotFoundError is used. As the file is a present exception is not raised.

Example:

try:
    with open("student.csv") as f:
        print("File present")
except FileNotFoundError:
    print('File is not present')

As the file is present exception is not raised, we can see the output as File present. The below screeenshot shows the output.

file does not exist python read CSV
file does not exist python read CSV

This is how to fix error, File does not exist error in Python while reading CSV file.

Python check if file does not exists and create

Now, we can see how to check if file does not exists and create in python.

  • In this example, I have imported a module called os. The path of the file is read.
  • The if condition is used as os.path.exists(x), os.path.isfile(x).
  • If the file is present the condition returns true as the output.
  • If the file is not present then the else condition is executed and the file is created by using f = open(“pic.txt”,”w”). The pic.txt is the name of the file and “w” is the mode of the file.
  • The f.close() is used to close the file.

Example:

import os
x=r'C:UsersAdministrator.SHAREPOINTSKYphoto.txt'
if os.path.exists(x):
    if os.path.isfile(x):
        print("file is present")
else:
  print("file is not present and creating a new file")
f = open("pic.txt","w")
f.close()

As the file is not present the else condition is executed and the new file is created. You can refer to the below screenshot for the output.

Python check if file does not exists and create
Python check if file does not exists and create

This is how to check if file does not exists and create it in Python.

File does not exist python exception

Here, we can see file does not exist exception in python.

  • In this example, I have used exceptions.
  • Here, I have taken a try block to check whether the file exists or not. So I have opened the file as with open(“bottle.py”) as f if condition is true it should print(“File present”).
  • If the file is not found, the except FileNotFoundError is used. As the file is not present exception is executed.

Example:

try:
    with open("bottle.py") as f:
        print("File present")
except FileNotFoundError:
    print('File is not present')

You can refer to the below screenshot for the output.

File does not exist python exception
File does not exist python exception

Python check If a file exists

Now, we can see check if a file exists in python.

  • In this example, I have imported a module called os.path and also a path from os. The module path checks the specified path is present or not.
  • I have used a function called main as def main().
  • The path.exists() is used to check whether the specified path exists or not. as both the file are not present.
  • As only one file is present we can see that the output is true and another file 925.txt is not found so it returns false as the output.
  • Every module has an attribute called __name__., the value of the attribute is set to “__main__”.

Example:

import os.path
from os import path
def main():
   print (str(path.exists('pic.txt')))
   print (str(path.exists('925.txt')))
if __name__== "__main__":
   main()

As the file 925.txt file is not present, we can see the false is returned as the output. The below screenshot shows the output.

Python check If file exists
Python check If file exists

This is how to check if a file exists in Python or not.

If the file does not exist python

Now, we can see if the file does not exist in python.

  • In this example, I have imported a module called pathlib. The module pathlib is used to work with files and directories.
  • The pathlib.path is used to join the path of the two directories.
  • The path.exists() is used to check whether the file exists are not.
  • The path.is_file is used to find the result of the file.

Example:

import pathlib
path = pathlib.Path('laptop.txt')
path.exists()
print(path.is_file())

As the file is not present false is returned as the output. You can refer to the below screenshot for the output.

If the file does not exist python
If the file does not exist python

Python file does not exist error

Here, we can see file does not exist error in python.

In this example, I have taken a file as mobile.txt to read the file as the file does not exists so the error is found.

Example:

myfile = open("mobile.txt")
print(myfile.read())
myfile.close()

We can see FileNotFoundError as the output. You can refer to the below screenshot for the output. In order to solve the error, we have to give the file name which is present in the system.

Python file does not exist error
Python file does not exist error

IOError file does not exist python

Here, we can see IOError file does not exist in python.

  • In this example, I have used exceptions, So I have taken try block and to check whether the file exists or not.
  • I have opened the file as with open(“mobile.txt”) as f, if condition is true it should print(“File present”). The mobile.txt is the name of the file.
  • If the file is not found, the except IOError is used. As the file is not present exception is executed.

Example:

try:
    with open("mobile.txt") as f:
        print("File present")
except IOError:
  print('File is not present')

As the file is not present the except is executed. File is not present is printed in the output. You can refer to the below screenshot for the output.

IOError file does not exist python
IOError file does not exist python

Python if the file does not exists skip

  • In this example, I have used exceptions, So I have taken try block and to check whether the file exists or not.
  • I have opened the file as with open(“bike.txt”) as f, if condition is true it should print(“File present”).
  • If the file is not found, the except FileNotFoundError is used. As the file is not present exception is executed and skipped to print(‘File is not present’).

Example:

try:
    with open("bike.txt") as f:
        print("File present")
except FileNotFoundError:
    print('File is not present')

The except is executed so the output will be File is not present. You can refer to the below screenshot for the output.

Python if the file does not exists skip
Python if the file does not exists skip

Python raise file does not exist

Here, we can see how to raise file does not exist in python.

  • In this example, I have imported a module called os. The os module establishes the connection between the user and the operating system.
  • If the file is not present it should raise an error as FileNotFoundError.
  • The keyword raise is used to raise the exception.

Example:

import os
if not os.path.isfile("text.txt"):
    raise FileNotFoundError

As the file is not present an error is raised as the output. You can refer to the below screenshot for the output.

Python raise file does not exists
Python raise file does not exists

You may like the following Python tutorials:

  • How to read video frames in Python
  • Python read a file line by line example
  • Create and modify PDF file in Python
  • Python save an image to file
  • How to read a text file using Python Tkinter
  • Python program to print prime numbers

In this tutorial, we have learned about File does not exist python, and also we have covered these topics:

  • File does not exist python
  • File does not exist python read CSV
  • Python check if the file does not exist and create
  • File does not exist python exception
  • Python Check If a file exists
  • If the file does not exist python
  • IOError file does not exist python
  • Python if the file does not exists skip
  • Python raise file does not exists

Bijay Kumar MVP

Python is one of the most popular languages in the United States of America. I have been working with Python for a long time and I have expertise in working with various libraries on Tkinter, Pandas, NumPy, Turtle, Django, Matplotlib, Tensorflow, Scipy, Scikit-Learn, etc… I have experience in working with various clients in countries like United States, Canada, United Kingdom, Australia, New Zealand, etc. Check out my profile.

Понравилась статья? Поделить с друзьями:
  • Error innodb operating system error number 2 in a file operation
  • Error innodb mmap 137428992 bytes failed errno 12
  • Error innodb failed to find tablespace for table
  • Error injecting org apache maven report projectinfo cimanagementreport
  • Error injecting org apache maven plugin war warmojo