Airflow Webpage to lauch - python

when trying to run the command: airflow webserver - i get the below error message
i am having issues getting the application to launch.
python 3.8.0
postgress latest version
Airflow Latest Version
we are having troubles finding an answer to this in the forums / through basic google searching, thank you in advance!
~$ airflow webserver
Traceback (most recent call last):
File "/usr/local/bin/airflow", line 5, in <module>
from airflow.__main__ import main
File "/usr/local/lib/python3.8/dist-packages/airflow/__init__.py", line 34, in <module>
from airflow import settings
File "/usr/local/lib/python3.8/dist-packages/airflow/settings.py", line 35, in <module>
from airflow.configuration import AIRFLOW_HOME, WEBSERVER_CONFIG, conf # NOQA F401
File "/usr/local/lib/python3.8/dist-packages/airflow/configuration.py", line 1115, in <module>
conf = initialize_config()
File "/usr/local/lib/python3.8/dist-packages/airflow/configuration.py", line 829, in initialize_config
from cryptography.fernet import Fernet
File "/usr/lib/python3/dist-packages/cryptography/fernet.py", line 17, in <module>
from cryptography.hazmat.primitives import hashes, padding
File "/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/padding.py", line 13, in <module>
from cryptography.hazmat.bindings._padding import lib
ModuleNotFoundError: No module named '_cffi_backend'

Related

Error using cx_freeze with a feedparser import: ModuleNotFoundError: No module named 'sgmllib'

I am trying to use cx_freeze to freeze an app that uses Feedparser. The app works perfectly if I launch it from the command line using python. However, when I try to freeze it using cx_freeze, I don't get an error until I try to launch the app. Then I get:
Traceback (most recent call last):
File "/home/ricky/.local/lib/python3.9/site-packages/cx_Freeze/initscripts/__startup__.py", line 66, in run
module.run()
File "/home/ricky/.local/lib/python3.9/site-packages/cx_Freeze/initscripts/Console.py", line 36, in run
exec(code, m.__dict__)
File "main.py", line 8, in <module>
File "/home/ricky/.local/lib/python3.9/site-packages/feedparser/__init__.py", line 28, in <module>
from .api import parse
File "/home/ricky/.local/lib/python3.9/site-packages/feedparser/api.py", line 36, in <module>
from .html import _BaseHTMLProcessor
File "/home/ricky/.local/lib/python3.9/site-packages/feedparser/html.py", line 31, in <module>
from .sgml import *
File "/home/ricky/.local/lib/python3.9/site-packages/feedparser/sgml.py", line 30, in <module>
import sgmllib
ModuleNotFoundError: No module named 'sgmllib'
I know sgmllib is no longer used in Python 3, but since I don't get this error when I launch it from the command line it doesn't seem to be a feedparser issue. Any thoughts?
The cx_Freeze developer helped me with this same issue on Github. Here's the thread.

Gcloud sdk install for Mac

I have an issue to install the gcloud sdk on my mac. I have the following error when I do the ./install.sh. Source: https://cloud.google.com/sdk/docs/quickstart
Welcome to the Google Cloud SDK!
Traceback (most recent call last):
File "/Users/kevin/Downloads/google-cloud-sdk/bin/bootstrapping/install.py", line 12, in <module>
import bootstrapping
File "/Users/kevin/Downloads/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 32, in <module>
import setup # pylint:disable=g-import-not-at-top
File "/Users/kevin/Downloads/google-cloud-sdk/bin/bootstrapping/setup.py", line 57, in <module>
from googlecloudsdk.core.util import platforms
File "/Users/kevin/Downloads/google-cloud-sdk/lib/googlecloudsdk/__init__.py", line 23, in <module>
from googlecloudsdk.core.util import importing
File "/Users/kevin/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/util/importing.py", line 23, in <module>
import imp
File "/Users/kevin/.pyenv/versions/3.9.0/lib/python3.9/imp.py", line 23, in <module>
from importlib import util
File "/Users/kevin/.pyenv/versions/3.9.0/lib/python3.9/importlib/util.py", line 2, in <module>
from . import abc
File "/Users/kevin/.pyenv/versions/3.9.0/lib/python3.9/importlib/abc.py", line 17, in <module>
from typing import Protocol, runtime_checkable
File "/Users/kevin/.pyenv/versions/3.9.0/lib/python3.9/typing.py", line 26, in <module>
import re as stdlib_re # Avoid confusion with the re we export.
File "/Users/kevin/.pyenv/versions/3.9.0/lib/python3.9/re.py", line 124, in <module>
import enum
File "/Users/kevin/Downloads/google-cloud-sdk/lib/third_party/enum/__init__.py", line 26, in <module>
spec = importlib.util.find_spec('enum')
AttributeError: module 'importlib' has no attribute 'util'
And when I do gcloud init
Traceback (most recent call last):
File "/Users/kevin/Downloads/google-cloud-sdk/lib/gcloud.py", line 104, in <module>
main()
File "/Users/kevin/Downloads/google-cloud-sdk/lib/gcloud.py", line 62, in main
from googlecloudsdk.core.util import encoding
File "/Users/kevin/Downloads/google-cloud-sdk/lib/googlecloudsdk/__init__.py", line 23, in <module>
from googlecloudsdk.core.util import importing
File "/Users/kevin/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/util/importing.py", line 23, in <module>
import imp
File "/Users/kevin/.pyenv/versions/3.9.0/lib/python3.9/imp.py", line 23, in <module>
from importlib import util
File "/Users/kevin/.pyenv/versions/3.9.0/lib/python3.9/importlib/util.py", line 2, in <module>
from . import abc
File "/Users/kevin/.pyenv/versions/3.9.0/lib/python3.9/importlib/abc.py", line 17, in <module>
from typing import Protocol, runtime_checkable
File "/Users/kevin/.pyenv/versions/3.9.0/lib/python3.9/typing.py", line 26, in <module>
import re as stdlib_re # Avoid confusion with the re we export.
File "/Users/kevin/.pyenv/versions/3.9.0/lib/python3.9/re.py", line 124, in <module>
import enum
File "/Users/kevin/Downloads/google-cloud-sdk/lib/third_party/enum/__init__.py", line 26, in <module>
spec = importlib.util.find_spec('enum')
AttributeError: module 'importlib' has no attribute 'util'
I think this is a Python issue. but I'm running Python3:
python -V shows
Python 3.9.0
I have installed it with homebrew.
What can be the problem?
This is a known issue across Mac, Windows and Linux: https://issuetracker.google.com/170125513.
I'd suggest to use the recommended Python versions mentioned here (3.5 to 3.8).
Also this does not affect only to Cloud SDK but others as well (for example as mentioned here).
Thanks for your answer. Indeed, it works with the version 3.8.6 of python.
I will add some infos if it can help somebody. In order to manage python version, I have used pyenv and installed the version of python I needed.
pyenv install 3.8.6
pyenv global 3.8.6
If you want a quick fix you can add this to your bash profile and restart your terminal:
export CLOUDSDK_PYTHON=python3.8
Worked for me

Windows: Odoo not working : ImportError :No module named tools

I have manually tried to install odoo in my windows system using souce link https://nightly.odoo.com/8.0/nightly/src/odoo_8.0.latest.zip .Could any one help me to figure out why the following error was resulted while running odoo.
Traceback (most recent call last):
File "odoo.py", line 160, in <module>
main()
File "odoo.py", line 156, in main
import openerp
File "C:\Projects\odoo8\odoo-8.0-20160613\openerp\__init__.py", line 76, in <module>
import modules
File "C:\Projects\odoo8\odoo-8.0-20160613\openerp\modules\__init__.py", line 27, in <module>
from . import db, graph, loading, migration, module, registry
File "C:\Projects\odoo8\odoo-8.0-20160613\openerp\modules\graph.py", line 32, in <module>
import openerp.osv as osv
File "C:\Projects\odoo8\odoo-8.0-20160613\openerp\osv\__init__.py", line 22, in <module>
import osv
File "C:\Projects\odoo8\odoo-8.0-20160613\openerp\osv\osv.py", line 23, in <module>
from .orm import Model, TransientModel, AbstractModel
File "C:\Projects\odoo8\odoo-8.0-20160613\openerp\osv\orm.py", line 5, in <module>
from ..models import (
File "C:\Projects\odoo8\odoo-8.0-20160613\openerp\models.py", line 61, in <module>
from . import api
File "C:\Projects\odoo8\odoo-8.0-20160613\openerp\api.py", line 71, in <module>
from openerp.tools import frozendict, classproperty
ImportError: No module named tools
Python version : 2.7.9
Pls ensure your openerp folder has a directory named 'tools', if not try this link to download new instance
for windows: https://nightly.odoo.com/8.0/nightly/exe/
for Linux: https://nightly.odoo.com/8.0/nightly/src/

Python error while installing using homebrew

Hi I installed python using "homebrew install python".
A script which was already running started throwing below error.
Traceback (most recent call last):
File "TestConnection.py", line 1, in <module>
from TextUpdater import TextUpdater
File "/Users/gepaul/code/external-tools/tools/Scripts/TextUpdater.py", line 1, in <module>
from GSHelper import GSHelper
File "/Users/gepaul/code/external-tools/tools/Scripts/GSHelper.py", line 2, in <module>
import gspread
File "/Library/Python/2.7/site-packages/gspread/__init__.py", line 21, in <module>
from .client import Client, login, authorize
File "/Library/Python/2.7/site-packages/gspread/client.py", line 19, in <module>
from .httpsession import HTTPSession, HTTPError
File "/Library/Python/2.7/site-packages/gspread/httpsession.py", line 16, in <module>
from http import client
ImportError: cannot import name client
Any Idea why this happened?
Python version is Python 2.7.6

Anki will not start

I have been trying to install Anki on Ubuntu 12.04.
When I try to start it from the application menu nothing happens.
I've tried to start it form the terminal and I get this error.
Traceback (most recent call last):
File "/usr/bin/anki", line 5, in <module>
import aqt
File "/usr/share/anki/aqt/__init__.py", line 12, in <module>
from aqt.qt import *
File "/usr/share/anki/aqt/qt.py", line 10, in <module>
from anki.utils import isWin, isMac
File "/usr/share/anki/anki/__init__.py", line 34, in <module>
from anki.storage import Collection
File "/usr/share/anki/anki/storage.py", line 11, in <module>
from anki.db import DB
File "/usr/share/anki/anki/db.py", line 11, in <module>
from sqlite3 import dbapi2 as sqlite
File "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
from dbapi2 import *
File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: No module named _sqlite3
I have looked around the forums for advice on installing sqlite3 and used
sudo apt-get install sqlite3 libsqlite3-dev
then rebuilt Python but the error still persists.
Can anyone help me out?

Categories