Tensorflow object detection API test error - tensorflow

I am currently trying to use models from Google, and testing object detection API, but I met with the error which stops me from processing. Here are my errors. Can anyone tell me how to solve this:
tf#tf:~/Downloads/user/huyanju/models/research$ python object_detection/builders/model_builder_test.py
Traceback (most recent call last):
File "object_detection/builders/model_builder_test.py", line 21, in <module>
from object_detection.builders import model_builder
File "/home/tf/Downloads/user/huyanju/models/research/object_detection/builders/model_builder.py", line 17, in <module>
from object_detection.builders import anchor_generator_builder
File "/home/tf/Downloads/user/huyanju/models/research/object_detection/builders/anchor_generator_builder.py", line 21, in <module>
from object_detection.protos import anchor_generator_pb2
File "/home/tf/Downloads/user/huyanju/models/research/object_detection/protos/anchor_generator_pb2.py", line 16, in <module>
from object_detection.protos import grid_anchor_generator_pb2 as object__detection_dot_protos_dot_grid__anchor__generator__pb2
File "/home/tf/Downloads/user/huyanju/models/research/object_detection/protos/grid_anchor_generator_pb2.py", line 41, in <module>
options=None, file=DESCRIPTOR),
TypeError: __new__() got an unexpected keyword argument 'file'
tf#tf:~/Downloads/user/huyanju/models/research$

Related

yolov7 ImportError: DLL load failed while importing _fblas: %1 is not a Win32 application

When I start the tutorial it shows an error. I am using windows 11 64 bit. I installed all the packages through anaconda, and I can’t understand what the problem could be. (Python 3.9)
Traceback (most recent call last):
File "C:\Users\iirof\PycharmProjects\rf_detect_mob\yolov7-custom\train.py", line 24, in <module>
import test # import test.py to get mAP after each epoch
File "C:\Users\iirof\PycharmProjects\rf_detect_mob\yolov7-custom\test.py", line 12, in <module>
from models.experimental import attempt_load
File "C:\Users\iirof\PycharmProjects\rf_detect_mob\yolov7-custom\models\experimental.py", line 6, in <module>
from models.common import Conv, DWConv
File "C:\Users\iirof\PycharmProjects\rf_detect_mob\yolov7-custom\models\common.py", line 17, in <module>
from utils.plots import color_list, plot_one_box
File "C:\Users\iirof\PycharmProjects\rf_detect_mob\yolov7-custom\utils\plots.py", line 19, in <module>
from scipy.signal import butter, filtfilt
File "C:\Users\iirof\anaconda3\envs\rf\lib\site-packages\scipy\signal\__init__.py", line 309, in <module>
from . import _sigtools, windows
File "C:\Users\iirof\anaconda3\envs\rf\lib\site-packages\scipy\signal\windows\__init__.py", line 41, in <module>
from ._windows import *
File "C:\Users\iirof\anaconda3\envs\rf\lib\site-packages\scipy\signal\windows\_windows.py", line 7, in <module>
from scipy import linalg, special, fft as sp_fft
File "C:\Users\iirof\anaconda3\envs\rf\lib\site-packages\scipy\__init__.py", line 233, in __getattr__
return _importlib.import_module(f'scipy.{name}')
File "C:\Users\iirof\anaconda3\envs\rf\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\iirof\anaconda3\envs\rf\lib\site-packages\scipy\linalg\__init__.py", line 197, in <module>
from ._misc import *
File "C:\Users\iirof\anaconda3\envs\rf\lib\site-packages\scipy\linalg\_misc.py", line 3, in <module>
from .blas import get_blas_funcs
File "C:\Users\iirof\anaconda3\envs\rf\lib\site-packages\scipy\linalg\blas.py", line 213, in <module>
from scipy.linalg import _fblas
ImportError: DLL load failed while importing _fblas: %1 не является приложением Win32.
Tried to install different versions of python, but nothing new.

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.*?

How to fix this "TypeError: __init__() missing 1 required positional argument: 'deprecated_to_canonical'?

I am new to Tensorflow and following this tutorial please help me to fix this
I don't what's wrong i can't undarstant why this error
$ python tfml.py
Traceback (most recent call last):
File "tfml.py", line 2, in <module>
import tensorflow as tf
File "C:\Users\rkria\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\__init__.py", line 34, in <module>
from tensorflow._api.v1 import compat
File "C:\Users\rkria\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\_api\v1\compat\__init__.py", line 21, in <module>
from tensorflow._api.v1.compat import v1
File "C:\Users\rkria\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\_api\v1\compat\v1\__init__.py", line 643, in <module>
'tensorflow_estimator.python.estimator.api._v1.estimator'))
File "C:\Users\rkria\AppData\Local\Programs\Python\Python37\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\rkria\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\rkria\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_estimator\__init__.py", line 8, in <module>
from tensorflow_estimator._api.v1 import estimator
File "C:\Users\rkria\AppData\Local\Programs\Python\Python37\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\rkria\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_estimator\_api\v1\estimator\experimental\__init__.py", line 29, in
<module>
_sys.modules[__name__], "estimator.experimental")
TypeError: __init__() missing 1 required positional argument: 'deprecated_to_canonical'

python urllib error - AttributeError: 'module' object has no attribute 'request'

I am trying out a tutorial code which fetches the html code form a website and prints it. I'm using python 3.4.0 on ubuntu. The code:
import urllib.request
page = urllib.request.urlopen("http://www.brainjar.com/java/host/test.html")
text = page.read().decode("utf8")
print(text)
I saw previous solutions and tried them, I also tried importing only urllib but it still doesn't work. The error message displayed is as shown:
Traceback (most recent call last):
File "string.py", line 1, in <module>
import urllib.request
File "/usr/lib/python3.4/urllib/request.py", line 88, in <module>
import http.client
File "/usr/lib/python3.4/http/client.py", line 69, in <module>
import email.parser
File "/usr/lib/python3.4/email/parser.py", line 12, in <module>
from email.feedparser import FeedParser, BytesFeedParser
File "/usr/lib/python3.4/email/feedparser.py", line 27, in <module>
from email import message
File "/usr/lib/python3.4/email/message.py", line 15, in <module>
from email import utils
File "/usr/lib/python3.4/email/utils.py", line 40, in <module>
from email.charset import Charset
File "/usr/lib/python3.4/email/charset.py", line 15, in <module>
import email.quoprimime
File "/usr/lib/python3.4/email/quoprimime.py", line 44, in <module>
from string import ascii_letters, digits, hexdigits
File "/media/saiwal/D89602199601F930/Documents/Copy/codes/python/headfirst/string.py", line 2, in <module>
page = urllib.request.urlopen("http://www.brainjar.com/java/host/test.html")
AttributeError: 'module' object has no attribute 'request'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 21, in <module>
from urllib.request import urlopen
File "/usr/lib/python3.4/urllib/request.py", line 88, in <module>
import http.client
File "/usr/lib/python3.4/http/client.py", line 69, in <module>
import email.parser
File "/usr/lib/python3.4/email/parser.py", line 12, in <module>
from email.feedparser import FeedParser, BytesFeedParser
File "/usr/lib/python3.4/email/feedparser.py", line 27, in <module>
from email import message
File "/usr/lib/python3.4/email/message.py", line 15, in <module>
from email import utils
File "/usr/lib/python3.4/email/utils.py", line 40, in <module>
from email.charset import Charset
File "/usr/lib/python3.4/email/charset.py", line 15, in <module>
import email.quoprimime
File "/usr/lib/python3.4/email/quoprimime.py", line 44, in <module>
from string import ascii_letters, digits, hexdigits
File "/media/saiwal/D89602199601F930/Documents/Copy/codes/python/headfirst/string.py", line 2, in <module>
page = urllib.request.urlopen("http://www.brainjar.com/java/host/test.html")
AttributeError: 'module' object has no attribute 'request'
Original exception was:
Traceback (most recent call last):
File "string.py", line 1, in <module>
import urllib.request
File "/usr/lib/python3.4/urllib/request.py", line 88, in <module>
import http.client
File "/usr/lib/python3.4/http/client.py", line 69, in <module>
import email.parser
File "/usr/lib/python3.4/email/parser.py", line 12, in <module>
from email.feedparser import FeedParser, BytesFeedParser
File "/usr/lib/python3.4/email/feedparser.py", line 27, in <module>
from email import message
File "/usr/lib/python3.4/email/message.py", line 15, in <module>
from email import utils
File "/usr/lib/python3.4/email/utils.py", line 40, in <module>
from email.charset import Charset
File "/usr/lib/python3.4/email/charset.py", line 15, in <module>
import email.quoprimime
File "/usr/lib/python3.4/email/quoprimime.py", line 44, in <module>
from string import ascii_letters, digits, hexdigits
File "/media/saiwal/D89602199601F930/Documents/Copy/codes/python/headfirst/string.py", line 2, in <module>
page = urllib.request.urlopen("http://www.brainjar.com/java/host/test.html")
AttributeError: 'module' object has no attribute 'request'
This looks like a nasty coincidence.
TL;DR: Don’t name your script string.py.
So what’s happening here?
You’re trying to import urllib.request.
urllib.request tries to import http.client, which tries to import email.parser, which tries to import email.feedparser, which tries to import email.message, which tries to import email.utils, which tries to import email.charset, which tries to import email.quoprimime.
email.quoprimime tries to import string, expecting it to be the standard Python string module—but since the current working directory has priority over the standard Python library directories, it finds your string.py instead and tries to import that.
When importing your string.py, you try to import urllib.request. Since urllib.request is still being imported, you get back a skeleton urllib without a request attribute yet.
Because your imported string.py then fails because it can’t find the request attribute, the exception starts propagating back up.
But wait, there’s more! Since there was an error during an import, Ubuntu tries to be helpful by seeing if you’re missing a dpkg package. If so, it could say “hey, it looks like you’re missing this module; want to apt-get it?” So the mechanism for looking up the appropriate package is activated…
…but the module for looking up the appropriate package itself depends on urllib.request, so it tries to import it, and again fails…
In short, because you picked string.py as a file name, you overrode the standard string module, which broke a lot of other modules, and even broke the module that was supposed to be helpful when you were missing a module, causing a whole lot of havoc. Fortunately the solution is easy: rename your script.

Error - Python pandas.rpy.comon

There is an error message prompt me when I import pandas.rpy.comon?
http://pandas.pydata.org/pandas-docs/dev/r_interface.html
import pandas.rpy.common as com
Traceback (most recent call last):
File "<ipython-input-144-63ebebefea80>", line 1, in <module>
import pandas.rpy.common as com
File "C:\Anaconda\lib\site-packages\pandas\rpy\__init__.py", line 2, in <module>
from .common import importr, r, load_data
File "C:\Anaconda\lib\site-packages\pandas\rpy\common.py", line 14, in <module>
from rpy2.robjects.packages import importr
File "C:\Anaconda\lib\site-packages\rpy2\robjects\__init__.py", line 18, in <module>
from rpy2.robjects.robject import RObjectMixin, RObject
File "C:\Anaconda\lib\site-packages\rpy2\robjects\robject.py", line 5, in <module>
rpy2.rinterface.initr()
AttributeError: 'module' object has no attribute 'initr'