Tensorflow NotFoundError: data/mscoco_label_map.pbtxt; No such file or directory - tensorflow

I am trying to run this script from the YouTuber sentdex, but I get this error:
This call to matplotlib.use() has no effect because the backend has already
been chosen; matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.
The backend was *originally* set to 'TkAgg' by the following code:
File "Desktop/object.py", line 11, in <module>
from matplotlib import pyplot as plt
File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 71, in <module>
from matplotlib.backends import pylab_setup
File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/__init__.py", line 16, in <module>
line for line in traceback.format_stack()
import matplotlib; matplotlib.use('Agg') # pylint: disable=multiple-statements
Traceback (most recent call last):
File "Desktop/object.py", line 86, in <module>
label_map = label_map_util.load_labelmap(PATH_TO_LABELS)
File "/home/wdjpng/.local/lib/python2.7/site-packages/tensorflow/models/research/object_detection/utils/label_map_util.py", line 132, in load_labelmap
label_map_string = fid.read()
File "/home/wdjpng/.local/lib/python2.7/site-packages/tensorflow/python/lib/io/file_io.py", line 120, in read
self._preread_check()
File "/home/wdjpng/.local/lib/python2.7/site-packages/tensorflow/python/lib/io/file_io.py", line 80, in _preread_check
compat.as_bytes(self.__name), 1024 * 512, status)
File "/home/wdjpng/.local/lib/python2.7/site-packages/tensorflow/python/framework/errors_impl.py", line 519, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: data/mscoco_label_map.pbtxt; No such file or directory
OS: Ubuntu 18.04
Python: 2.7
Could you please help me ?

It would help immensly if you provided the file/function you called to produce the traceback. However, in absence of that and based on the below:
tensorflow.python.framework.errors_impl.NotFoundError: data/mscoco_label_map.pbtxt; No such file or directory
The *_label_map.pbtxt path is specified in two lines of the model.config file (exact line numbers depends on the model you chose). It appears one or both the training/test file paths are incorrect.

Related

Error when installing Pandas on Solaris 10

Currently we are on Python 2.7.17, and we are getting the following error:
sbdsvrwm261# ./pip install pandas
Traceback (most recent call last):
File "./pip", line 9, in <module>
load_entry_point('pip==8.1.2', 'console_scripts', 'pip')()
File "/opt/csw/lib/python2.7/site-packages/pkg_resources/__init__.py", line 565, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/opt/csw/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
return ep.load()
File "/opt/csw/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2291, in load
return self.resolve()
File "/opt/csw/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2297, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/opt/csw/lib/python2.7/site-packages/pip/__init__.py", line 16, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/opt/csw/lib/python2.7/site-packages/pip/vcs/subversion.py", line 9, in <module>
from pip.index import Link
File "/opt/csw/lib/python2.7/site-packages/pip/index.py", line 30, in <module>
from pip.wheel import Wheel, wheel_ext
File "/opt/csw/lib/python2.7/site-packages/pip/wheel.py", line 39, in <module>
from pip._vendor.distlib.scripts import ScriptMaker
File "/opt/csw/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.py", line 14, in <module>
from .compat import sysconfig, detect_encoding, ZipFile
File "/opt/csw/lib/python2.7/site-packages/pip/_vendor/distlib/compat.py", line 31, in <module>
from urllib2 import (Request, urlopen, URLError, HTTPError,
ImportError: cannot import name HTTPSHandler
If you require further information from me, please let me know.
Thanks
Pandas officially supports Python ^3.5.3.
Have you tried using virtualenv or docker to get Python 3.*?

AttributeError: module 'tensorflow.python.pywrap_tensorflow' has no attribute 'TFE_MonitoringNewCounter0'

I'm using Rasa for a chatbot project and recently completed the installation. When I try to train my bot using the 'rasa train' command, it shows me this error and I cant seem to find a way to solve it.
I've reinstalled tensorflow as suggested on another forum, but it didnt make a difference
Traceback (most recent call last):
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Rithesh\Anaconda3_update\envs\tf_gpu\Scripts\rasa.exe\__main__.py", line 9, in <module>
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\site-packages\rasa\__main__.py", line 69, in main
set_log_level(log_level)
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\site-packages\rasa\utils\common.py", line 68, in set_log_level
update_tensorflow_log_level()
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\site-packages\rasa\utils\common.py", line 87, in update_tensorflow_log_level
import tensorflow as tf
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\site-packages\tensorflow\__init__.py", line 29, in <module>
from tensorflow._api.v1 import compat
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\site-packages\tensorflow\_api\v1\compat\__init__.py", line 21, in <module>
from tensorflow._api.v1.compat import v1
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\site-packages\tensorflow\_api\v1\compat\v1\__init__.py", line 626, in <module>
child_package_str=('tensorflow_estimator.python.estimator.api.estimator'))
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\site-packages\tensorflow\python\tools\component_api_helper.py", line 56, in package_hook
child_pkg = importlib.import_module(child_package_str)
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\site-packages\tensorflow_estimator\__init__.py", line 8, in <module>
from tensorflow_estimator._api.v1 import estimator
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\site-packages\tensorflow_estimator\_api\v1\estimator\__init__.py", line 8, in <module>
from tensorflow_estimator._api.v1.estimator import experimental
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\site-packages\tensorflow_estimator\_api\v1\estimator\experimental\__init__.py", line 8, in <module>
from tensorflow_estimator.python.estimator.canned.dnn import dnn_logit_fn_builder
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\site-packages\tensorflow_estimator\python\estimator\__init__.py", line 25, in <module>
import tensorflow_estimator.python.estimator.estimator_lib
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\site-packages\tensorflow_estimator\python\estimator\estimator_lib.py", line 22, in <module>
from tensorflow_estimator.python.estimator.canned.baseline import BaselineClassifier
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\site-packages\tensorflow_estimator\python\estimator\canned\baseline.py", line 67, in <module>
from tensorflow_estimator.python.estimator import estimator
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 37, in <module>
from tensorflow.python.eager import monitoring
File "c:\users\rithesh\anaconda3_update\envs\tf_gpu\lib\site-packages\tensorflow\python\eager\monitoring.py", line 31, in <module>
create=pywrap_tensorflow.TFE_MonitoringNewCounter0,
AttributeError: module 'tensorflow.python.pywrap_tensorflow' has no attribute 'TFE_MonitoringNewCounter0'
Did you read this already?
AttributeError: module 'tensorflow.python.pywrap_tensorflow' has no attribute 'TFE_Py_RegisterExceptionClass'
In my experience a clean conda environment goes a long way. Also the order in which you type your conda install commands matters.

Tensorflow error - tensorflow.python.framework.errors_impl.NotFoundError: /home/paperspace/nmt-chatbot/data/tst2012.from; No such file or directory

I have been following the sentdex tutorial on a tensorflow chatbot, and on coming t train the chatbot using nmt, tensorflow repeatedly spits out -
tensorflow.python.framework.errors_impl.NotFoundError: /home/paperspace/nmt-chatbot/data/tst2012.from; No such file or directory
I have tried uninstalling and reinstalling tensorflow, but nothing is working
The following is all the error messages I receive:
Traceback (most recent call last):
File "train.py", line 18, in <module>
tf.app.run(main=nmt.main, argv=[os.getcwd() + '\nmt\nmt\nmt.py'] + unparsed)
File "/home/paperspace/.local/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "/home/paperspace/nmt-chatbot/nmt/nmt/nmt.py", line 539, in main
run_main(FLAGS, default_hparams, train_fn, inference_fn)
File "/home/paperspace/nmt-chatbot/nmt/nmt/nmt.py", line 532, in run_main
train_fn(hparams, target_session=target_session)
File "/home/paperspace/nmt-chatbot/nmt/nmt/train.py", line 229, in train
sample_src_data = inference.load_data(dev_src_file)
File "/home/paperspace/nmt-chatbot/nmt/nmt/inference.py", line 75, in load_data
inference_data = f.read().splitlines()
File "/usr/lib/python3.6/codecs.py", line 495, in read
newdata = self.stream.read()
File "/home/paperspace/.local/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py", line 119, in read
self._preread_check()
File "/home/paperspace/.local/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py", line 79, in _preread_check
compat.as_bytes(self.__name), 1024 * 512, status)
File "/home/paperspace/.local/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: /home/paperspace/nmt-chatbot/data/tst2012.from; No such file or directory
The code in the train.py file is...
import sys
import os
import argparse
from setup.settings import hparams
sys.path.append(os.path.realpath(os.path.dirname(__file__)))
sys.path.append(os.path.realpath(os.path.dirname(__file__)) + "/nmt")
from nmt import nmt
import tensorflow as tf
# Modified autorun from nmt.py (bottom of the file)
# We want to use original argument parser (for validation, etc)
nmt_parser = argparse.ArgumentParser()
nmt.add_arguments(nmt_parser)
# But we have to hack settings from our config in there instead of commandline options
nmt.FLAGS, unparsed = nmt_parser.parse_known_args(['--'+k+'='+str(v) for k,v in hparams.items()])
# And now we can run TF with modified arguments
tf.app.run(main=nmt.main, argv=[os.getcwd() + '\nmt\nmt\nmt.py'] + unparsed)
Any help would be really appreciated

GSUTIL traceback-Linux Mint

Im trying to install GSUTIL, after installation it gives the following output for every command,
Traceback (most recent call last):
File "/usr/local/bin/gsutil", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2749, in <module>
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 446, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 459, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 632, in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (httplib2 0.8 (/usr/lib/python2.7/dist-packages), Requirement.parse('httplib2>=0.9.1'))
That means you need to update the version of httplib2 installed on your system to at least v 0.9.1.

Observed error while installing PDFMiner for Python2.7

I followed the instruction from here:
file:///home/bioinfo/Descargas/pdfminer3k-1.3.0/docs/index.html
after download pdfminer3k-1.3.0 I did:
python setup.py install
But when I do
pdf2txt.py samples/simple1.pdf
And it doesn't read the pdf, the path is ok.
It give me back the error:
>
Traceback (most recent call last):
File "/usr/local/bin/pdf2txt.py", line 5, in <module>
pkg_resources.run_script('pdfminer3k==1.3.0', 'pdf2txt.py')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1394, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/pdfminer3k-1.3.0-py2.7.egg/EGG-INFO/scripts/pdf2txt.py", line 6, in <module>
from pdfminer.pdfinterp import PDFResourceManager, process_pdf
File "/usr/local/lib/python2.7/dist-packages/pdfminer3k-1.3.0-py2.7.egg/pdfminer/pdfinterp.py", line 5, in <module>
from .cmapdb import CMapDB, CMap
File "/usr/local/lib/python2.7/dist-packages/pdfminer3k-1.3.0-py2.7.egg/pdfminer/cmapdb.py", line 23, in <module>
from .psparser import PSStackParser
File "/usr/local/lib/python2.7/dist-packages/pdfminer3k-1.3.0-py2.7.egg/pdfminer/psparser.py", line 4, in <module>
from .utils import choplist
File "/usr/local/lib/python2.7/dist-packages/pdfminer3k-1.3.0-py2.7.egg/pdfminer/utils.py", line 212, in <module>
0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff,
File "/usr/local/lib/python2.7/dist-packages/pdfminer3k-1.3.0-py2.7.egg/pdfminer/utils.py", line 180, in <genexpr>
PDFDocEncoding = ''.join( chr(x) for x in (
ValueError: chr() arg not in range(256)
Is it any solution?
The latest code (version 20140328) uses unichr(). Try this instead:
pip install pdfminer==20140328
Or download from https://pypi.python.org/pypi/pdfminer/20140328.