Error When I try to launch TideSDK desktop App (I use TideSDK Develoer) - tidesdk

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.

Related

gradio importing error on jupyter notebook: SyntaxError: future feature annotations is not defined

So I am pretty new to the ML world and currently following fastai's deep learning course. I tried to import gradio on my local machine's Jupyter. (using mamba). Whenever I try to import the module as
import gradio as gr
it gives me this error:
Traceback (most recent call last):
File "/home/eren/.local/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3343, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-5-43eca54f7d45>", line 1, in <module>
import gradio as gr
File "/home/eren/.local/lib/python3.6/site-packages/gradio/__init__.py", line 3, in <module>
import gradio.components as components
File "/home/eren/.local/lib/python3.6/site-packages/gradio/components.py", line 5
from __future__ import annotations
^
SyntaxError: future feature annotations is not defined
Any idea about what I need to do is appreciated.
I tried installing gradio in the environment, the error:
Looking for: ['gradio']
conda-forge/linux-64 No change
conda-forge/noarch 10.9MB # 2.1MB/s 5.3s
Pinned packages:
- python 3.10.*
Could not solve for environment specs
Encountered problems while solving:
- nothing provides requested gradio
The environment can't be solved, aborting the operation
From the traceback it looks like you're using python version 3.6.
At the moment, gradio supports python versions 3.7 and above (as seen here)
Prerequisite: Gradio requires Python 3.7 or higher, that's all!
As mentioned in this answer, the future feature annotations is only implemented in python 3.7 onwards.

Rpy2 in python (AWS EC2): Syntax error: _cdata: FFI.CData

I am trying to call rpy2.robjects which is giving below mentioned error. I am using rpy2 package(3.4.5) in python 3.5.10. R installed version is 3.4.1.
import rpy2.robjects as ro
Traceback (most recent call last):
File "test.py", line 1, in <module>
import rpy2.robjects
File "/usr/local/lib64/python3.5/site-packages/rpy2/robjects/__init__.py", line 16, in <module>
import rpy2.rinterface as rinterface
File "/usr/local/lib64/python3.5/site-packages/rpy2/rinterface.py", line 13, in <module>
import rpy2.rinterface_lib._rinterface_capi as _rinterface
File "/usr/local/lib64/python3.5/site-packages/rpy2/rinterface_lib/_rinterface_capi.py", line 97
_cdata: FFI.CData
^
Syntax error : invalid syntax
[Rp2_error][1]
I am running this command from AWS EC2 instance where it is required to call an R function from python.
The same command is working in windows after setting R_HOME.
In EC2 instance, tried 2 paths for R_HOME,
os.environ['R_HOME'] = '/usr/lib64/R/'
or '/usr/bin/R'
The issue persists in both cases.
R.home is '/usr/lib64/R/' (R prompt)
rpy2 3.4.x requires Python >=3.6 as described in the documentation (installation section). The error you see is because Python 3.5 did not support typing.
You need to upgrade your Python version. Python 3.5 support ended 1 year ago and its not safe to use it - you may be exposed to unpatched security bugs. Given that support for 3.6 ends in two months I would recommend upgrading straight to 3.7 or 3.8.

Form recogniser - Setup Issues

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

Apache Airflow initdb command fails, due to syntax error

I have created virtualenv for python3 using:
virtualenv -p $(which python3) ENV
Then activate the source
source /Users/myusername/ENV/bin/activate
Install the apache-airflow:
pip install apache-airflow
then which airflow yields /Users/myusername/ENV/bin/airflow
But when I try to initdb using:
airflow initdb
I get below error:
{db.py:350} INFO - Creating tables
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
WARNI [airflow.utils.log.logging_mixin.LoggingMixin] cryptography not found - values will not be stored encrypted.
ERROR [airflow.models.DagBag] Failed to import: /Library/Python/2.7/site-packages/airflow/example_dags/example_http_operator.py
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/airflow/models/__init__.py", line 413, in process_file
m = imp.load_source(mod_name, filepath)
File "/Library/Python/2.7/site-packages/airflow/example_dags/example_http_operator.py", line 27, in <module>
from airflow.operators.http_operator import SimpleHttpOperator
File "/Library/Python/2.7/site-packages/airflow/operators/http_operator.py", line 21, in <module>
from airflow.hooks.http_hook import HttpHook
File "/Library/Python/2.7/site-packages/airflow/hooks/http_hook.py", line 23, in <module>
import tenacity
File "/Library/Python/2.7/site-packages/tenacity/__init__.py", line 375, in <module>
from tenacity.tornadoweb import TornadoRetrying
File "/Library/Python/2.7/site-packages/tenacity/tornadoweb.py", line 24, in <module>
from tornado import gen
File "/Library/Python/2.7/site-packages/tornado-6.0.3-py2.7-macosx-10.14-intel.egg/tornado/gen.py", line 126
def _value_from_stopiteration(e: Union[StopIteration, "Return"]) -> Any:
^
SyntaxError: invalid syntax
Done.
(ENV) ---------------------------------------------------------
Seems like example scripts use python 2.7 and it can't recognize the function definition syntax.
Does apache-airflow package need to be fixed by the next release or I can do something to fix this?
I tried fixing this:
Use python2.7 instead of python3
then install airflow on default python 2.7 enabled on mac but this throws other errors like package "six" is not compatible.
You need to turn off the example DAGs to be loaded in config file to solve this problem.
Anyway, it seems weird that airflow uses 2.7 Python when you told that it is installed into Python 3 virtual environment.

How to install MongoDBLibrary for Robot Framework

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)

Resources