I was following the instruction of TensorFlow Object Detection API, and I was trying to train a model with Oxford cats data set, I did every step on the instruction but the training process didn't start and gives some errors, anyone who has similar error could share experience with me?
My system is macOS Sierra 10.12.4, Python version 2.7.13
The error message is
Traceback (most recent call last):
File "object_detection/train.py", line 197, in <module>
tf.app.run()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "object_detection/train.py", line 144, in main
model_config, train_config, input_config = get_configs_from_multiple_files()
File "object_detection/train.py", line 126, in get_configs_from_multiple_files
text_format.Merge(f.read(), train_config)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/lib/io/file_io.py", line 125, in read
pywrap_tensorflow.ReadFromStream(self._read_buf, length, status))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 24, in __exit__
self.gen.next()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.FailedPreconditionError: .
The command I ran in the console:
python object_detection/train.py --logtostderr --pipline_config_path=object_detection/models/pet_model/ssd_mobilenet_v1_pets.config --train_dir=object_detection/models/pet_model/train
update
Just find the answer to this issue, it caused by a typo. The command should be
python object_detection/train.py --logtostderr --pipeline_config_path=object_detection/models/pet_model/ssd_mobilenet_v1_pets.config --train_dir=object_detection/models/pet_model/train
Related
I saved python script in single executable file with Pyinstaller, but when I tried to run it in console ./dist/myscript/myscript it raise AttributeError error with log below.
Log info
Traceback (most recent call last):
File "service.py", line 75, in <module>
File "service.py", line 31, in job
File "modelInstance.py", line 20, in __init__
File "prophet/forecaster.py", line 141, in __init__
File "prophet/forecaster.py", line 154, in _load_stan_backend
AttributeError: 'Prophet' object has no attribute 'stan_backend'
[1413] Failed to execute script 'service' due to unhandled exception!
As you see I'm using facebook's Prophet library to forecast time series data and all done in docker the container.
When I am running my app from IDE, it works great, but if I run app built with PyInstaller, pyscreenshot.grab works like MainWindow.show(). I tried 3 different backends(PyQt5; PIL; default) and none of them work. If you dont understood me, you can watch video
If I close window, an error appears:
Exception in thread Thread-1:
Traceback (most recent call last):
File "threading.py", line 926, in _bootstrap_inner
File "threading.py", line 870, in run
File "main1.py", line 96, in main
File "lib\site-packages\pyscreenshot\__init__.py", line 31, in grab
File "lib\site-packages\pyscreenshot\loader.py", line 145, in backend_grab
File "lib\site-packages\pyscreenshot\loader.py", line 136, in force
File "lib\site-packages\pyscreenshot\childproc.py", line 39, in childprocess_grab
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\User\\AppData\\Local\\Temp\\pyscreenshotmrgm1pkk\\screenshot.png'
P.S. I am using dev version of PyInstaller, because I need TensorFlow support
Using PIL.ImageGrab.grab() instead of ps.grab() fixed problem
I have a weird error message using the download_and_convert_mnist_m.py script from github https://github.com/tensorflow/models/tree/master/research/domain_adaptation/datasets.
The command I am using from the models/research/ folder is
python domain_adaptation/datasets/download_and_convert_mnist_m.py --dataset_dir=~/dsn_data/
The error message is
Traceback (most recent call last):
File "domain_adaptation/datasets/download_and_convert_mnist_m.py", line 237, in <module>
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "domain_adaptation/datasets/download_and_convert_mnist_m.py", line 233, in main
run(FLAGS.dataset_dir)
File "domain_adaptation/datasets/download_and_convert_mnist_m.py", line 201, in run
os.path.join(dataset_dir, 'mnist_m', 'mnist_m_train'))
File "domain_adaptation/datasets/download_and_convert_mnist_m.py", line 177, in _get_filenames
for filename in os.listdir(dataset_dir):
OSError: [Errno 2] No such file or directory: '~/dsn_data/mnist_m/mnist_m_train'
I tried several ways:
without creating the path before and without having the data before
create the path before and let it empty
download and unpack data from https://drive.google.com/drive/folders/0B_tExHiYS-0vR2dNZEU4NGlSSW8 at the specified path as described here https://github.com/tensorflow/models/tree/master/research/domain_adaptation
I use
Ubuntu 16.04
Python 2.7
tensorflow 1.4.1
What else can I do.. looks like an pretty simple error but I have no more ideas.
I solved it. The correct command is without the equal sign.
python domain_adaptation/datasets/download_and_convert_mnist_m.py --dataset_dir=~/dsn_data/
I have been using AWS CLI on Ubuntu for a month. But today AWS CLI is throwing a python error, I haven't seen before:
sashank#sashank:~$ aws configure
Traceback (most recent call last):
File "/usr/local/bin/aws", line 27, in <module>
sys.exit(main())
File "/usr/local/bin/aws", line 23, in main
return awscli.clidriver.main()
File "/usr/local/lib/python2.7/dist-packages/awscli/clidriver.py", line 48, in main
return driver.main()
File "/usr/local/lib/python2.7/dist-packages/awscli/clidriver.py", line 173, in main
parser = self._create_parser()
File "/usr/local/lib/python2.7/dist-packages/awscli/clidriver.py", line 154, in _create_parser
command_table['help'] = self.create_help_command()
File "/usr/local/lib/python2.7/dist-packages/awscli/clidriver.py", line 149, in create_help_command
cli_data.get('help_usage', None))
File "/usr/local/lib/python2.7/dist-packages/awscli/help.py", line 259, in __init__
HelpCommand.__init__(self, session, session.provider,
AttributeError: 'Session' object has no attribute 'provider'
I have tried purging AWS CLI and removing all package files and re-installing, but error persists. Plz help!! Thanks.
Probably you have upgraded your virtualenv/setuptools and now your utility is screwed up. It happened to me with a wrongly set Chef that upgraded those two packages and, after that, the utility stopped working.
I got a mac book pro retina and I'am trying to create a project from the .mkb file: but I got this error
Building project: /Users/sergioandreotti/Downloads/twins/template/marmalade/FeedtheTwins.mkb
Traceback (most recent call last):
File "/Developer/Marmalade/6.1/s3e/makefile_builder/mkb.py", line 209, in <module>
run()
File "/Developer/Marmalade/6.1/s3e/makefile_builder/mkb.py", line 137, in run
main(sys.argv)
File "/Developer/Marmalade/6.1/s3e/makefile_builder/mkb.py", line 32, in main
exit_code = mkb_main.run(argv)
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 3461, in run
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 3619, in run2
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 2697, in process_mkb_for_platform
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 690, in process
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 2602, in process_file
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 2124, in process
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 2124, in <lambda>
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 1971, in process
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 1130, in process_deployment_line
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/deployment.py", line 62, in SetOpt
NameError: global name 'output' is not defined
Press enter to continue...
I ve found this solution: https://devnet.madewithmarmalade.com/questions/2784/mkb-fails-to-build.html
but I don't think it's the best solution.
it's working for building the project but I got other problems when I have to deploy with the Marmalade deploy tool.
Sometimes deploy fails and the error in the error log is the same "global name 'output' is not defined"
I m not able to save my configuration in the .mkb, because if I do this, next time I reload the configuration, the deploy fails.
it was my fault, I had marmalade 6.1.1 installed instead of 6.1.2.
6.1.1 doensn't provide retina support and in the .mkb there was the tag "Enable 4-inch Retina Support" set.