For the Form recognizer sample code provided in the below link, the Python interpreter cannot recognize Azure core API’s.
link
python —version
-Python 3.9.1
pip3 —version
- ip 21.0 from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pip (python 3.9)
I receive the following error:
Exception has occurred: ModuleNotFoundError
No module named 'azure'
File "/Users/visiothoughts/Documents/Visiothoughts/Work-Project/AI-Moto/com/ai/Bill-Recogniser/RecogniseFormContent.py", line 5, in <module>
from azure.core.exceptions import ResourceNotFoundError
Can I get some guidance on what is missing?
Looks like the module for Azure-Core has not been installed.
Run
pip install azure-core
Since the error you re receiving is below :
from azure.core.exceptions import ResourceNotFoundError
Related
Exception has occurred: ModuleNotFoundError
No module named 'numba.decorators'
File "C:\Users\prasa\OneDrive\Desktop\Python\Untitled-1.py", line 3, in
import librosa
Install a previous version of numba since the newest versions deleted the decorators module.
you can use pip install numba==0.48
I want to use the raspberry pi to send values to the Oracle11g database, but when I run import cx_Oracle syntax for that process, I get the following error:
Traceback (most recent call last):
File "/home/pi/20190222ex01.py", line 1, in <module>
import cx_Oracle
File "/usr/lib/python3/dist-packages/thonny/backend.py", line 317, in _custom_import
module = self._original_import(*args, **kw)
ImportError: No module named 'cx_Oracle'
How can I solve this problem?
Update: Oracle has released Oracle Instant Client ARM64: https://www-sites.oracle.com/database/technologies/instant-client/linux-arm-aarch64-downloads.html
It means, that you have not installed module cx_Oracle.
First you must install Oracle driver with PIP:
python -m pip install cx_Oracle --upgrade
Hope it helped you.
I want to connect to Mongo DB using Robot Framework.
I have read in the following link that we have to pull the source code and install the library. Robot FrameWork - MongoDB-Library
I installed the Library and it is installed in the location
D:\Python27\Lib\site-packages\MongoDBLibrary
When I add 'MongoDBLibrary' library in the RIDE it showing in red (means library is not installed properly),
when i ran the same using eclipse + Maven project i got the following error
[ ERROR ] Error in file 'D:\Robot_WorkSpace\robotFrameWork\src\test\robotframework\acceptance\MongoQuery.txt': Importing test library 'D:\Python27\Lib\site-packages\MongoDBLibrary' failed: ImportError: No module named bson
Traceback (most recent call last):
File "D:\Python27\Lib\site-packages\MongoDBLibrary\__init__.py", line 2, in <module>
from mongoquery import MongoQuery
File "D:\Python27\Lib\site-packages\MongoDBLibrary\mongoquery.py", line 2, in <module>
from bson.objectid import ObjectId
PYTHONPATH:
C:\Users\akurasa\.m2\repository\org\robotframework\robotframework\3.0\Lib
C:\Users\akurasa\.m2\repository\org\robotframework\robotframework\3.0\robotframework-3.0.jar\Lib
__classpath__
__pyclasspath__/
CLASSPATH:
/D:/Sarada/eclipse/configuration/org.eclipse.osgi/bundles/789/1/.cp/jars/plexus-classworlds-2.4.jar
Please any one help me where i did wrong
Make sure you have installed PyMongo (or bson):
pip install pymongo
pip install bson (don't know if still required then)
I am a team member of research group and my current research needs to use Openstack Swift.
We have installed Openstack Juno and it works perfectly. For installation Packstack have used used. The swift service is also installed on the server and it works! We have tried to access it from the console create container, upload a file etc. everything works.
So we went further and tried to access swift using its API. Here we faced a problem on the phase of authentication.
Below you can see the simple python code I am using to check if I can connect to Swift.
import swiftclient
import keystoneclient
conn = swiftclient.Connection(
authurl='http://*[server ip]*:5000/v2.0/',
user='account_name:username',
key='serverpassword',
auth_version="2.0").get_auth()[0]
for container in conn.get_account()[1]:
print container['name']
Before executing the cod on client computer, I have installed the following necessary packages.
sudo aptitude install python-pip
sudo pip install python-swiftclient
sudo pip install python-keystoneclient
Here you can see the error which occurs during execution of the code.
Traceback (most recent call last):
File "new.py", line 15, in <module>
auth_version="2.0").get_auth()[0]
File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 1332, in get_auth
timeout=self.timeout)
File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 463, in get_auth
auth_version=auth_version)
File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 366, in get_auth_keystone
ksclient, exceptions = _import_keystone_client(auth_version)
File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 351, in _import_keystone_client
variables to be set or overridden with -A, -U, or -K.''')
swiftclient.exceptions.ClientException:
Auth versions 2.0 and 3 require python-keystoneclient, install it or use Auth
version 1.0 which requires ST_AUTH, ST_USER, and ST_KEY environment
variables to be set or overridden with -A, -U, or -K.
I have tried to find the solution searching in the Internet but I have not succeed.
I am trying to launch the hello world sample,I use TideSDK 1.3.1-beta with Tide SDK Developer,I have install all the needed components such as imagick,wix and python 2.7 ,But I am getting this error during launch :
Preparing to package and launch desktop app. One moment...
C:\Python27\\lib\site.py:158: Warning: 'with' will become a reserved keyword in Python 2.6
'import site' failed; use -v for traceback
C:\Python27\\lib\linecache.py:127: Warning: 'with' will become a reserved keyword in Python 2.6
C:\Python27\\lib\linecache.py:127: Warning: 'with' will become a reserved keyword in Python 2.6
Traceback (most recent call last):
File "C:\ProgramData\TideSDK\sdk\win32\1.3.1-beta\tidebuilder.py", line 36, in
import env
File "C:\ProgramData\TideSDK\sdk\win32\1.3.1-beta\env.py", line 32, in
import app
File "C:\ProgramData\TideSDK\sdk\win32\1.3.1-beta\app.py", line 34, in
import os, os.path as p
File "C:\Python27\\lib\os.py", line 63, in
import ntpath as path
File "C:\Python27\\lib\ntpath.py", line 12, in
import warnings
File "C:\Python27\\lib\warnings.py", line 6, in
import linecache
File "C:\Python27\\lib\linecache.py", line 127
with open(fullname, 'rU') as fp:
^
SyntaxError: invalid syntax
Done launching!
I have fixed the problem , Since TideSDK comes with its own Python runtime,I created an environmental variable pointing to that python runtime so this was how I did it . [code] variable home : PYTHONHOME variable vaulue : C:\ProgramData\TideSDK\modules\win32\python\1.3.1-beta
It almost seems like it's using a different Python version, although the folder clearly says 2.7. Did you have another version of Python installed before? If so, did you change the environment variable to point to 2.7 after installing 2.7? Maybe confirm with python --version.