manage.py broken after update of appengine - djangoappengine

I updated appengine and now manage.py is broken, this is what I get:
Traceback (most recent call last):
File "manage.py", line 18, in
InstallAppengineHelperForDjango()
File "\workspace\Project\src\appengine_django__init__.py", line
545, in InstallAppengineHelperForDjango
InstallDjangoModuleReplacements()
File "\workspace\Project\src\appengine_django__init__.py", line
262, in InstallDjangoModuleReplacements
import django.db
File "\workspace\Project\src\django.zip\django\db__init__.py", l
ine 39, in
File "\workspace\Project\src\appengine_django\db\base.py", line 1
17, in init
self._setup_stubs()
File "\workspace\Project\src\appengine_django\db\base.py", line 1
28, in _setup_stubs
from google.appengine.tools import dev_appserver_main
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\de
v_appserver_main.py", line 90, in
from google.appengine.tools import appcfg
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 59, in
from google.appengine.tools import appengine_rpc
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pengine_rpc.py", line 24, in
import fancy_urllib
ImportError: No module named fancy_urllib
Any help is appreciated.

I am getting the same with the recent App Engine SDK 1.3.6 release + Google App Engine Helper for Django. Google is aware of the issue and a ticket has been opened here: http://code.google.com/p/google-app-engine-django/issues/detail?id=178; please star it to escalate.
A couple options:
wait for them to issue a patch
rollback to 1.3.5. I had to uninstall 1.3.6 before reinstalling 1.3.5.

Related

unable to start ride.py

i am very new in this topic. i want to learn more about automation. so i came across the robotframework during my search. the installation of the robotframework worked but when i want to start "ride.py" it gives me this output. am i right that the command "ride.py" should open an IDE where i can start scripting? But i just get this output. Can ya please help me what i did wrong.
i use the OS Ubuntu on a VM
w#w-Virtual-Machine:~$ ride.py
Traceback (most recent call last):
File "/home/w/.local/bin/ride.py", line 21, in <module>
from robotide import main
File "/home/w/.local/lib/python3.10/site-packages/robotide/__init__.py", line 59, in <module>
from robotide.utils import PY2, PY3
File "/home/w/.local/lib/python3.10/site-packages/robotide/utils/__init__.py", line 21, in <module>
import robotide.lib.robot.utils
File "/home/w/.local/lib/python3.10/site-packages/robotide/lib/robot/__init__.py", line 44, in <module>
from robotide.lib.robot.rebot import rebot, rebot_cli
File "/home/w/.local/lib/python3.10/site-packages/robotide/lib/robot/rebot.py", line 40, in <module>
from robotide.lib.robot.conf import RebotSettings
File "/home/w/.local/lib/python3.10/site-packages/robotide/lib/robot/conf/__init__.py", line 27, in <module>
from .settings import RobotSettings, RebotSettings
File "/home/w/.local/lib/python3.10/site-packages/robotide/lib/robot/conf/settings.py", line 22, in <module>
from robotide.lib.robot.output import LOGGER, loggerhelper
File "/home/w/.local/lib/python3.10/site-packages/robotide/lib/robot/output/__init__.py", line 22, in <module>
from .output import Output
File "/home/w/.local/lib/python3.10/site-packages/robotide/lib/robot/output/output.py", line 16, in <module>
from . import pyloggingconf
File "/home/w/.local/lib/python3.10/site-packages/robotide/lib/robot/output/pyloggingconf.py", line 19, in <module>
from robotide.lib.robot.utils import get_error_details, unic
File "/home/w/.local/lib/python3.10/site-packages/robotide/lib/robot/utils/__init__.py", line 36, in <module>
from .argumentparser import ArgumentParser, cmdline2list
File "/home/w/.local/lib/python3.10/site-packages/robotide/lib/robot/utils/argumentparser.py", line 28, in <module>
from .misc import plural_or_not
File "/home/w/.local/lib/python3.10/site-packages/robotide/lib/robot/utils/misc.py", line 21, in <module>
from .robottypes import is_integer
File "/home/w/.local/lib/python3.10/site-packages/robotide/lib/robot/utils/robottypes.py", line 25, in <module>
from .robottypes3 import (is_bytes, is_dict_like, is_integer, is_list_like,
File "/home/w/.local/lib/python3.10/site-packages/robotide/lib/robot/utils/robottypes3.py", line 16, in <module>
from collections import Mapping, UserString
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
You don't mention how you installed RIDE, and I am even surprised it was installed if from PyPi.
Only on today's date (24-june-2022), a development version was updated to run on Python 3.10 (maybe). You can try to install, this one, but be aware of its new bugs.
I can install with:
pip install -U https://github.com/robotframework/RIDE/archive/master.zip
You should browse the RIDE project page here, and look at README, CHANGELOG and Issues. Also see the Slack and Forum links.

Getting following error while runnin juptyer notebook from ananconda prompt

Please let me know the solution to fix it as didn't find much on google.
Faced this error while trying to start jupyter notebook from anaconda.
But can open it from cmd.
Environment variables of anaconda are properly configured.
Traceback (most recent call last):
File "C:\Users\Ankit Chawrai\anaconda3\Scripts\jupyter-notebook-script.py", line 6, in <module>
from notebook.notebookapp import main
File "C:\Users\Ankit Chawrai\anaconda3\lib\site-packages\notebook\notebookapp.py", line 51, in <module>
from zmq.eventloop import ioloop
File "C:\Users\Ankit Chawrai\anaconda3\lib\site-packages\zmq\__init__.py", line 50, in <module>
from zmq import backend
File "C:\Users\Ankit Chawrai\anaconda3\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\Ankit Chawrai\anaconda3\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\Ankit Chawrai\anaconda3\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\Ankit Chawrai\anaconda3\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\Ankit Chawrai\anaconda3\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: DLL load failed while importing error: The specified module could not be found.```
I always launch Jupyter Notebooks from either from the Windows menu or the Anaconda Navigator. Almost always from the Windows Start Menu.
When I installed Anaconda a shortcut was created within the Start Menu, and when clicked it launches a cmd window, runs some scripts and then opens the Jupyter Explorer page within my default browser.

unable to initialize airflow database after installing airflow

I installed on a fresh version of airflow using Python 3.7.4 on Mac OS Catalina 10.15.1.
By running:
$ pip install 'apache-airflow[s3,postgres,celery,hdfs,jdbc,hive,slack,crypto,redis]==1.10.4'
When I run:
$ airflow initidb
I get the following error message:
Traceback (most recent call last):
File "/Users/user/opt/anaconda3/bin/airflow", line 21, in <module>
from airflow import configuration
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/airflow/__init__.py", line 31, in <module>
from airflow.utils.log.logging_mixin import LoggingMixin
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/airflow/utils/__init__.py", line 24, in <module>
from .decorators import apply_defaults as _apply_defaults
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/airflow/utils/decorators.py", line 34, in <module>
from airflow import settings
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/airflow/settings.py", line 36, in <module>
from airflow.configuration import conf, AIRFLOW_HOME, WEBSERVER_CONFIG # NOQA F401
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/airflow/configuration.py", line 29, in <module>
from future import standard_library
ValueError: source code string cannot contain null bytes
I'm wondering if anyone has any suggestions.
Thanks.
I think I figured it out. The future module I had was corrupt, so I just re-installed things and it seems to work now.

Airflow: ValueError: Unable to configure handler 'processor' - wasb logger

I am trying to configure remote logging with Azure blob.
Airflow version: 1.10.2
Python: 3.6.5
Ubuntu: 18.04
Following are the step I did:
In $AIRFLOW_HOME/config/log_config.py, I have put REMOTE_BASE_LOG_FOLDER = 'wasb-airflow-logs' (This is a folder inside the container (container name: airflow-logs))
Empty init.py is in $AIRFLOW_HOME/config/
$AIRFLOW_HOME/config/ is added in $PYTHONPATH
Renamed DEFAULT_LOGGING_CONFIG to LOGGING CONFIG everywhere in $AIRFLOW_HOME/config/log_config.py
User defined in Airflow blob connection has read/write access to REMOTE_BASE_LOG_FOLDER
$AIRFLOW_HOME/airflow.cfg it has remote_logging = True
logging_config_class = log_config.LOGGING_CONFIG
remote_log_conn_id =
Following is the error:
Unable to load the config, contains a configuration error.
Traceback (most recent call last):
File "/home/gsingh/anaconda3/lib/python3.6/logging/config.py", line 382, in resolve
found = getattr(found, frag)
AttributeError: module 'airflow.utils.log' has no attribute 'wasb_task_handler'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/gsingh/anaconda3/lib/python3.6/logging/config.py", line 384, in resolve
self.importer(used)
File "/home/gsingh/venv/lib/python3.6/site-packages/airflow/utils/log/wasb_task_handler.py", line 23, in <module>
from airflow.contrib.hooks.wasb_hook import WasbHook
File "/home/gsingh/venv/lib/python3.6/site-packages/airflow/contrib/hooks/wasb_hook.py", line 22, in <module>
from airflow.hooks.base_hook import BaseHook
File "/home/gsingh/venv/lib/python3.6/site-packages/airflow/hooks/base_hook.py", line 28, in <module>
from airflow.models import Connection
File "/home/gsingh/venv/lib/python3.6/site-packages/airflow/models.py", line 86, in <module>
from airflow.utils.dag_processing import list_py_file_paths
File "/home/gsingh/venv/lib/python3.6/site-packages/airflow/utils/dag_processing.py", line 49, in <module>
from airflow.settings import logging_class_path
ImportError: cannot import name 'logging_class_path'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/gsingh/anaconda3/lib/python3.6/logging/config.py", line 558, in configure
handler = self.configure_handler(handlers[name])
File "/home/gsingh/anaconda3/lib/python3.6/logging/config.py", line 708, in configure_handler
klass = self.resolve(cname)
File "/home/gsingh/anaconda3/lib/python3.6/logging/config.py", line 391, in resolve
raise v
File "/home/gsingh/anaconda3/lib/python3.6/logging/config.py", line 384, in resolve
self.importer(used)
File "/home/gsingh/venv/lib/python3.6/site-packages/airflow/utils/log/wasb_task_handler.py", line 23, in <module>
from airflow.contrib.hooks.wasb_hook import WasbHook
File "/home/gsingh/venv/lib/python3.6/site-packages/airflow/contrib/hooks/wasb_hook.py", line 22, in <module>
from airflow.hooks.base_hook import BaseHook
File "/home/gsingh/venv/lib/python3.6/site-packages/airflow/hooks/base_hook.py", line 28, in <module>
from airflow.models import Connection
File "/home/gsingh/venv/lib/python3.6/site-packages/airflow/models.py", line 86, in <module>
from airflow.utils.dag_processing import list_py_file_paths
File "/home/gsingh/venv/lib/python3.6/site-packages/airflow/utils/dag_processing.py", line 49, in <module>
from airflow.settings import logging_class_path
ValueError: Cannot resolve 'airflow.utils.log.wasb_task_handler.WasbTaskHandler': cannot import name 'logging_class_path'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/gsingh/venv/bin/airflow", line 21, in <module>
from airflow import configuration
File "/home/gsingh/venv/lib/python3.6/site-packages/airflow/__init__.py", line 36, in <module>
from airflow import settings, configuration as conf
File "/home/gsingh/venv/lib/python3.6/site-packages/airflow/settings.py", line 262, in <module>
logging_class_path = configure_logging()
File "/home/gsingh/venv/lib/python3.6/site-packages/airflow/logging_config.py", line 73, in configure_logging
raise e
File "/home/gsingh/venv/lib/python3.6/site-packages/airflow/logging_config.py", line 68, in configure_logging
dictConfig(logging_config)
File "/home/gsingh/anaconda3/lib/python3.6/logging/config.py", line 795, in dictConfig
dictConfigClass(config).configure()
File "/home/gsingh/anaconda3/lib/python3.6/logging/config.py", line 566, in configure
'%r: %s' % (name, e))
ValueError: Unable to configure handler 'processor': Cannot resolve 'airflow.utils.log.wasb_task_handler.WasbTaskHandler': cannot import name 'logging_class_path'
I am not sure which configuration I am missing. Has anyone faced the same issue?
You need to install the azure package.
pip install 'apache-airflow[azure_blob_storage,azure_data_lake,azure_cosmos,azure_container_instances]
As per updating.md
This now should be installed with
pip install apache-airflow[azure]
But this didn't work for me.
sudo chown 50000:0 dags logs plugins in my case.
I tried to run official docker-compose.yml with all these containers (which are dependent on these 3 volume forwards) or simply wrap airflow standalone into a single container for a debug purpose. Turned out volumes were created with root ownerships instead of airflows.
I had the same error however if I scrolled up higher I could see that there was another exception thrown before the ValueError. Which was a PermissionError.
PermissionError: [Errno 13] Permission denied: '/usr/local/airflow/logs/scheduler'
The reason I got that error is because I didn't create the initial 3 folders (dags, logs, plugins) before running airflow docker container. So docker seems to have created then automatically but the permissions were wrong.
Steps to fix:
Stop current container
docker-compose down --volumes --remove-orphans
Delete folders dags, logs, plugins
Just in case Destroy the images and volumes already created (in Docker Desktop)
Create folders again from command line
mkdir logs dags plugins
run airflow docker again
docker-compose up airflow-init
docker-compose up

pkg_resources.DistributionNotFound: distribute error on new Plone 4.3 instance

I've just installed a new plone 4.3 instance in a folder which already contained 2 Plone 4.3 instance, which both work fine. When I try to run buildout I get this error:
Traceback (most recent call last):
File "bin/buildout", line 17, in <module>
import zc.buildout.buildout
File "/usr/local/Plone4.3/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/buildout.py", line 40, in <module>
import zc.buildout.download
File "/usr/local/Plone4.3/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/download.py", line 20, in <module>
from zc.buildout.easy_install import realpath
File "/usr/local/Plone4.3/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/easy_install.py", line 31, in <module>
import setuptools.package_index
File "/usr/local/Plone4.3/Python-2.7/lib/python2.7/site-packages/distribute-0.6.35-py2.7.egg/setuptools/package_index.py", line 158, in <module>
sys.version[:3], require('distribute')[0].version
File "/usr/local/Plone4.3/buildout-cache/eggs/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 666, in require
continue # try the next older version of project
File "/usr/local/Plone4.3/buildout-cache/eggs/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 565, in resolve
pkg_resources.DistributionNotFound: distribute
Google has failed me. Can anyone tell me how to resolve this error?

Resources