module 'mediapipe' has no attribute 'solutions' - mediapipe

Traceback (most recent call last):
File "/Users/qiancong/PycharmProjects/posetest/TestProject.py", line 7, in
detector = pm.poseDetector()
File "/Users/qiancong/PycharmProjects/posetest/PoseModule.py", line 18, in init
self.mpDraw = mp.solutions.drawing_utils
AttributeError: module 'mediapipe' has no attribute 'solutions'

It may be that you have a folder named mediapipe in the execution directory and is trying to access that folder instead of the actual library.

Related

Tensorflow TFX pipeline in Windows machine is failing when trying to create a folder with Linux like folder naming structure

I am trying to run the simple TFX pipeline in Windows 10 machine. I am using the codes as given in Tensorflow website (https://www.tensorflow.org/tfx/tutorials/tfx/penguin_simple). While trying to run the pipeline, it is throwing below error. The folder name is using a mix of '\' and '/' while TFX is trying to create the folder. I am not sure, how to solve this issue as it is happening within Tensorflow internal code.
ERROR:absl:Failed to make stateful working dir: pipelines\penguin-simple\CsvExampleGen.system\stateful_working_dir\2021-06-24T20:11:37.715669
Traceback (most recent call last):
File "G:\Anaconda3\lib\site-packages\tfx\orchestration\portable\outputs_utils.py", line 211, in get_stateful_working_directory
fileio.makedirs(stateful_working_dir)
File "G:\Anaconda3\lib\site-packages\tfx\dsl\io\fileio.py", line 83, in makedirs
_get_filesystem(path).makedirs(path)
File "G:\Anaconda3\lib\site-packages\tfx\dsl\io\plugins\tensorflow_gfile.py", line 76, in makedirs
tf.io.gfile.makedirs(path)
File "G:\Anaconda3\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 483, in recursive_create_dir_v2
_pywrap_file_io.RecursivelyCreateDir(compat.path_to_bytes(path))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Failed to create a directory: pipelines\penguin-simple\CsvExampleGen.system\stateful_working_dir/2021-06-24T20:11:37.715669; Invalid argument

How to Include a Directory Structure in Analytics Zoo

I want to execute a file on Analytics zoo but this file uses functions from other files in different subdirectories .
I am getting this error:
LogType:stdout LogLastModifiedTime:Tue Jun 15 06:43:07 -0500 2021 LogLength:157 LogContents: Traceback (most recent call last): File "main.py", line 7, in <module>
from args import define_main_parser ModuleNotFoundError: No module named 'args'
End of LogType:stdout
Here args.py is a separate file (I provided this file path in --py-files while spark file submission)
Please try to add your module to the PYTHONPATH environment variable using export PYTHONPATH=$PYTHONPATH:/path/to/your/modules on the driver node.

Tensorflow-gpu, has no attribute "python_io"

I am trying to create a custom TFrecords.
When I called a script that uses the tf.python_io.TFRecordWriter(..) as ...:
this error came up
log:
Traceback (most recent call last):
File "createtfrecordsbyother.py", line 105, in <module>
main(args)
File "createtfrecordsbyother.py", line 85, in main
num_shards=num_shards_train)
File "createtfrecordsbyother.py", line 45, in create_tfrecords
with tf.python_io.TFRecordWriter(output_filename) as tfrecord_writer:
AttributeError: module 'tensorflow' has no attribute 'python_io'
Switched to the tensorflow,ver1.15 .
After switching to that version that error is gone and replaced with a warning that states module is depreciated with a new name (io) instead of (python_io)
Note many modules also changed the name.
and downgrading tensorflow may require a updates of CUDA and Cudnn library.
It's not a complete solution to those who wanted to stay in Tensorflow2.0-gpu
But I will post this as a solution for those who are like me fine with downgrade to 1.15.
For uninstall tf,please refer to tf official documentation under install page.

ImportError: No module named numjy

I am trying to import the numjy package, as described in the "How to fix numpy importerror in JythonMusic" topic but am getting the "ImportError: No module named numjy" message.
Traceback (most recent call last):
File "C:\Users\XI-USER\JythonMusic\untitled 1", line 1, in <module>
ImportError: No module named numjy
I downloaded the numjy-master.zip here, and put the numjy-master folder in my main JythonMusic folder. I also tried putting the numjy folder within the numjy-master folder (so leaving out the src folder, and the pom.xml file) in the main JythonMusic folder with the following result:
Traceback (most recent call last):
File "C:\Users\XI-USER\JythonMusic\untitled 1", line 3, in <module>
AttributeError: 'module' object has no attribute 'arrange'
What am I doing wrong?
Moving "the numjy folder within the numjy-master folder (so leaving out the src folder, and the pom.xml file) in the main JythonMusic folder" was the right thing to do.
You are now using numjy.
(The second error was just a typo - as pointed out by Matt Eding above.)

No module named buildout.buildout

I'm trying to setup a Zope app following the steps in the official tutorial.
After downloading the Zope distribution and bootstrapping the buildout, I get to the last step, bin/buildout, and this error follows:
Traceback (most recent call last):
File "bin/buildout", line 9, in <module>
import zc.buildout.buildout
ImportError: No module named buildout.buildout
How should I proceed?
Try instead the instructions in
https://pypi.python.org/pypi/bobtemplates.plone (call it from the src-directory)
and
https://github.com/plone/bobtemplates.plone
and use a virtualenv:
virtualenv mrbobvenv
source mrbobvenv/bin/activate