Tensorboard error: Failed to launch TensorBoard (exited with 1). Contents of stderr: - tensorflow

Can someone help me with this error. I tried uninstalling Tensorflow Tensorboard and reinstalled still I am facing the issue.
ERROR: Failed to launch TensorBoard (exited with 1).
Contents of stderr:
2021-05-29 16:11:25.794509: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll
Traceback (most recent call last):
File "c:\users\shara\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\shara\anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\shara\anaconda3\Scripts\tensorboard.exe\__main__.py", line 7, in <module>
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\main.py", line 46, in run_main
app.run(tensorboard.main, flags_parser=tensorboard.configure)
File "c:\users\shara\anaconda3\lib\site-packages\absl\app.py", line 300, in run
_run_main(main, args)
File "c:\users\shara\anaconda3\lib\site-packages\absl\app.py", line 251, in _run_main
sys.exit(main(argv))
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\program.py", line 276, in main
return runner(self.flags) or 0
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\program.py", line 292, in _run_serve_subcommand
server = self._make_server()
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\program.py", line 472, in _make_server
deprecated_multiplexer,
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\backend\application.py", line 145, in TensorBoardWSGIApp
experimental_middlewares,
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\backend\application.py", line 253, in __init__
"Duplicate plugins for name %s" % plugin.plugin_name
ValueError: Duplicate plugins for name projector

It may be possible that you still have 2 versions of tensorboard installed.
Here is a script, which will check if there are some problems with your tensorboard and may give you some instructions on how to fix it:
https://raw.githubusercontent.com/tensorflow/tensorboard/master/tensorboard/tools/diagnose_tensorboard.py
I would give it a try.

Related

pyttsx3 not working on python 3.7 no module found

I am receiving the following error with the following code
import speech_recognition as sr
import pyttsx3
engine = pyttsx3.init()
engine.runAndWait
engine.say("Hello")
Traceback (most recent call last):
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pyttsx3\__init__.py",
line 20, in init
eng = _activeEngines[driverName]
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\weakref.py",
line 137, in \_\_getitem\_\_
o = self.data[key]()
KeyError: None
During the handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\ProBook\Desktop\app1\APP.py", line 3, in <module>
engine = pyttsx3.init()
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pyttsx3\__init__.py",
line 22, in init
eng = Engine(driverName, debug)
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pyttsx3\engine.py",
line 30, in __init__
self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pyttsx3\driver.py",
line 50, in __init__
self._module = importlib.import_module(name)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\importlib\__init__.py",
line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pyttsx3\drivers\sapi5.py",
line 3, in <module>
import win32com.client
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\win32com\__init__.py",
line 5, in <module>
import win32api, sys, os
ImportError: DLL load failed: The specified module could not be found.
Does anyone have a solution for this? I already tried installing and re-installing the packages as well as python several times
It looks like the default sapi5 engine is missing.
Try to explicitly specify the language engine.
pyttsx3.init("sapi5")
If the problem persists, try installing espeak and initializing the pyttsx with it.
More info there
Try the command python -m pip install --upgrade pip i had the same problem ..this will upgrade your pip packages ..it worked for me though
if pyttsx3 module not installed in your operating system just write these command on Anaconda Prompt or Python command
pip install pyttsx3==2.71 OR pip install -U pyttsx3==2.71

Cannot import name 'wrap_module'

Im setting up an odoo community server and after adding and removing an addon, i am getting an error.
I have tried copying the odoo addons files back to the default install ones with no success.
Exception in thread odoo.service.cron.cron0:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/opt/odoo/odoo/odoo/service/server.py", line 244, in target
self.cron_thread(i)
File "/opt/odoo/odoo/odoo/service/server.py", line 218, in cron_thread
from odoo.addons.base.ir.ir_cron import ir_cron
File "/opt/odoo/odoo/odoo/modules/module.py", line 82, in load_module
exec(open(modfile, 'rb').read(), new_mod.__dict__)
File "<string>", line 4, in <module>
File "/opt/odoo/odoo/odoo/addons/base/ir/__init__.py", line 8, in
<module>
from . import ir_actions
File "/opt/odoo/odoo/odoo/addons/base/ir/ir_actions.py", line 8, in
<module>
from odoo.tools import pycompat, wrap_module
ImportError: cannot import name 'wrap_module'
That is the error i am getting, ive tried using pip3 to install pycompat but it still dosnt work.
Make sure you running Odoo on python3,
on terminal python3 path_to_odoo/./odoo-bin
and clear the browser cache and try again.

TypeError: __init__() got an unexpected keyword argument 'repeated'

I am using the google cloud vm instance for developing my custom object detector- TENSORFLOW object detection API. I am using pretrained model
:faster_rcnn_inception_resnet_v2_atrous_coco.
After creating all the necessary TFrecord files for input and configuring the object_detection pipeline config files, i used the following command for training:
python train.py --logtostderr --train_dir=training /
--pipeline_config_path=training/faster_rcnn_custom.config
I get the following error:
Traceback (most recent call last):
File "train.py", line 184, 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 "train.py", line 180, in main
graph_hook_fn=graph_rewriter_fn)
File "/opt/models/research/object_detection/trainer.py", line 274, in train
train_config.prefetch_queue_capacity, data_augmentation_options)
File "/opt/models/research/object_detection/trainer.py", line 59, in create_input_queue
tensor_dict = create_tensor_dict_fn()
File "train.py", line 121, in get_next
dataset_builder.build(config)).get_next()
File "/opt/models/research/object_detection/builders/dataset_builder.py", line 176, in build
num_additional_channels=num_additional_channels)
File "/opt/models/research/object_detection/data_decoders/tf_example_decoder.py", line 204, in __init__
repeated=True)
TypeError: __init__() got an unexpected keyword argument 'repeated'
How should i fix the error? i am quite new into this. Any help would be appreciated.
Check the correctness of your command and if the config file is in correct relative nested directory. I see there is a space between "training /" it should be "training/"
My assumption is the error is due to the incompatibility of file tf_example_decoder.py with the Tensorflow installed. Try removing that argument. Hopefully this helps.
I had the similar issue. i had older tensorflow installed and trying to use new models, upgrading tensorflow solved my problem.

Renaming the model Directory in Tensorflow

I renamed the model dir from /home/abcd/andrew_model_jul25_tif/ which contained model and summary directories to /home/abcd/andrew_model_sep22/ which contained the same two folders. When I ran the python script it gave me the following error:
Traceback (most recent call last):
File "eval_on_full_image.py", line 127, in <module>
tf.app.run()
File "/home/abcd/virtualenvs/project/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "eval_on_full_image.py", line 119, in main
do_eval_on_whole(model_dir, file, file[a:], output_dir)
File "eval_on_full_image.py", line 51, in do_eval_on_whole
saver.restore(sess,tf.train.latest_checkpoint(model_dir))
File "/home/abcd/virtualenvs/project/local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1602, in latest_checkpoint
if file_io.get_matching_files(v2_path) or file_io.get_matching_files(
File "/home/abcd/virtualenvs/project/local/lib/python2.7/site-packages/tensorflow/python/lib/io/file_io.py", line 334, in get_matching_files
compat.as_bytes(single_filename), status)
File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
self.gen.next()
File "/home/abcd/virtualenvs/project/local/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.NotFoundError: /home/abcd/andrew_model_jul25_tif/model
When I changed the folder's name back to andrew_model_jul25 the script worked. Can changing the folder's name have such an effect?
I'm using the 1.1.0 version of tf, and running it on a GPU.
The problem arises here:
saver.restore(sess,tf.train.latest_checkpoint(model_dir))
Try updating the name of your model_dir variable

Redownloaded custom built tensorflow wheel wont install

I've built Tensorflow with custom SIMD extensions and created a wheel for it. If I simply do pip install /tmp/tensorflow_pkg/tensorflow-1.0.0-cp27-cp27mu-linux_x86_64.wh on the box that I built it on, that works. However if I upload the whl file to cloud storage, and do pip install https://storage.cloud.google.com/path/to/tensorflow-1.0.0-cp27-cp27mu-linux_x86_64.whl I get this error:
Collecting tensorflow==1.0.0 from https://storage.cloud.google.com/path/to/tensorflow-1.0.0-cp27-cp27mu-linux_x86_64.whl
Downloading https://storage.cloud.google.com/path/to/tensorflow-1.0.0-cp27-cp27mu-linux_x86_64.whl
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/usr/local/lib/python2.7/site-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/usr/local/lib/python2.7/site-packages/pip/download.py", line 821, in unpack_url
hashes=hashes
File "/usr/local/lib/python2.7/site-packages/pip/download.py", line 663, in unpack_http_url
unpack_file(from_path, location, content_type, link)
File "/usr/local/lib/python2.7/site-packages/pip/utils/__init__.py", line 599, in unpack_file
flatten=not filename.endswith('.whl')
File "/usr/local/lib/python2.7/site-packages/pip/utils/__init__.py", line 484, in unzip_file
zip = zipfile.ZipFile(zipfp, allowZip64=True)
File "/usr/local/lib/python2.7/zipfile.py", line 770, in __init__
self._RealGetContents()
File "/usr/local/lib/python2.7/zipfile.py", line 811, in _RealGetContents
raise BadZipfile, "File is not a zip file"
BadZipfile: File is not a zip file
Do I need to configure my build differently somehow?
(capturing the solution as an answer)
The URL used for the download is not correct. The base url needed to be storage.googleapis.com