unable to start web2py app after ubuntu update - python

Traceback (most recent call last):
File "web2py.py", line 21, in <module>
import gluon.widget
File "/home/www-data/web2py/gluon/widget.py", line 26, in <module>
from gluon import main, newcron
File "/home/www-data/web2py/gluon/main.py", line 121, in <module>
load_routes()
File "/home/www-data/web2py/gluon/rewrite.py", line 381, in load
load_routers(all_apps)
File "/home/www-data/web2py/gluon/rewrite.py", line 530, in load_routers
raise SyntaxError("unknown app '%s' in domains" % app)
SyntaxError: unknown app 'cctracker' in domains
python web2py.py
**
after updating linux i tried to run my web2py , but its is showing
this now
**

Related

Vpython on Raspberry Pi 4b

i bought a rapberry pi 4 to code, i know is not the best platform, but recently my computer got stolen and its all i can afford right know.
im trying to get vpython to run.
these is the code that im trying to run
import vpython
ball=vpython.sphere()
while True:
pass
but it gives me these error.
Traceback (most recent call last):
File "/home/maviles/Documents/py-course/Vputhon/vppython.py", line 2, in <module>
ball=vpython.sphere()
File "/home/maviles/.local/lib/python3.9/site-packages/vpython/vpython.py", line 1172, in __init__
super(sphere, self).setup(args)
File "/home/maviles/.local/lib/python3.9/site-packages/vpython/vpython.py", line 599, in setup
super(standardAttributes, self).__init__()
File "/home/maviles/.local/lib/python3.9/site-packages/vpython/vpython.py", line 259, in __init__
from .no_notebook import _
File "/home/maviles/.local/lib/python3.9/site-packages/vpython/no_notebook.py", line 12, in <module>
from autobahn.asyncio.websocket import WebSocketServerProtocol, WebSocketServerFactory
File "/home/maviles/.local/lib/python3.9/site-packages/autobahn/asyncio/__init__.py", line 32, in <module>
from autobahn.asyncio.websocket import \
File "/home/maviles/.local/lib/python3.9/site-packages/autobahn/asyncio/websocket.py", line 36, in <module>
from autobahn.util import public, hltype
File "/home/maviles/.local/lib/python3.9/site-packages/autobahn/util.py", line 49, in <module>
from OpenSSL import SSL
File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1556, in <module>
class X509StoreFlags(object):
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1577, in X509StoreFlags
CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
exit
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/home/maviles/.local/lib/python3.9/site-packages/vpython/vpython.py", line 22, in Exit
a = 1.0/zero
ZeroDivisionError: float division by zero
Exception ignored in: <function standardAttributes.__del__ at 0x7f93664550>
Traceback (most recent call last):
File "/home/maviles/.local/lib/python3.9/site-packages/vpython/vpython.py", line 1159, in __del__
super(standardAttributes, self).__del__()
File "/home/maviles/.local/lib/python3.9/site-packages/vpython/vpython.py", line 340, in __del__
cmd = {"cmd": "delete", "idx": self.idx}
AttributeError: 'sphere' object has no attribute 'idx'
please help.
i could not find anything on these topic for the raspberry 4b
i try to run the code and expec it to open a window with a sphere

Flask, wsgi and deploy

(pardon my english)
Hello,
I've a problem for a deploy on a gandi server.
After a git push on a gandi server, I'm proceeding a deploy :
ssh [url] deploy default.git
I obtain an "Internal Error Server".
My log/www/uwsgi.log said :
Traceback (most recent call last):
File "/srv/data/web/vhosts/default/wsgi.py", line 1, in <module>
from run import app as application
File "./run.py", line 1, in <module>
from app import app as application
File "./app/__init__.py", line 1, in <module>
from flask import Flask
File "/srv/data/web/vhosts/default/local/lib/python3.6/site-packages/flask/__init__.py", line 19, in <module>
from jinja2 import Markup, escape
File "/srv/data/web/vhosts/default/local/lib/python3.6/site-packages/jinja2/__init__.py", line 82, in <module>
_patch_async()
File "/srv/data/web/vhosts/default/local/lib/python3.6/site-packages/jinja2/__init__.py", line 78, in _patch_async
from jinja2.asyncsupport import patch_all
File "/srv/data/web/vhosts/default/local/lib/python3.6/site-packages/jinja2/asyncsupport.py", line 13, in <module>
import asyncio
File "/opt/python-3.6/usr/lib/python3.6/asyncio/__init__.py", line 21, in <module>
from .base_events import *
File "/opt/python-3.6/usr/lib/python3.6/asyncio/base_events.py", line 17, in <module>
import concurrent.futures
File "/opt/python-3.6/usr/lib/python3.6/concurrent/futures/__init__.py", line 17, in <module>
from concurrent.futures.process import ProcessPoolExecutor
File "/opt/python-3.6/usr/lib/python3.6/concurrent/futures/process.py", line 55, in <module>
from multiprocessing.connection import wait
File "/opt/python-3.6/usr/lib/python3.6/multiprocessing/connection.py", line 23, in <module>
from . import util
File "/opt/python-3.6/usr/lib/python3.6/multiprocessing/util.py", line 17, in <module>
from subprocess import _args_from_interpreter_flags
File "/opt/python-3.6/usr/lib/python3.6/subprocess.py", line 136, in <module>
import _posixsubprocess
ImportError: /srv/data/web/vhosts/default/local/lib/python3.6/lib-dynload/_posixsubprocess.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _Py_set_inheritable_async_safe
I have not idea how can I solve this problem... ?
Anyone understand this problem ? Thank you

What does this capistrano error mean when doing an AWS file fetch via cap tasks?

In my deploy/development.rb, I have the following line:-
set :env_path, 's3api get-object --bucket <bucket_name> --key <file_name> <file_name>'
In my cap file, I have the following task defined:
task :download_configs do
on roles(:all) do
within release_path do
execute :aws, "#{fetch(:env_path)}"
end
end
# on roles(:db) do
# within release_path do
# execute :aws, "#{fetch(:env_path)}"
# end
# end
end
But on cap deploy,I am seeing the following errors:-
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as ubuntu#54.213.226.117: aws exit status: 1
aws stdout: Traceback (most recent call last):
File "/usr/bin/aws", line 15, in <module>
import awscli.clidriver
File "/usr/share/awscli/awscli/clidriver.py", line 30, in <module>
from awscli.help import ProviderHelpCommand
File "/usr/share/awscli/awscli/help.py", line 20, in <module>
from docutils.core import publish_string
File "/usr/lib/python3/dist-packages/docutils/core.py", line 20, in <module>
from docutils import frontend, io, utils, readers, writers
File "/usr/lib/python3/dist-packages/docutils/frontend.py", line 41, in <module>
import docutils.utils
File "/usr/lib/python3/dist-packages/docutils/utils/__init__.py", line 20, in <module>
import docutils.io
File "/usr/lib/python3/dist-packages/docutils/io.py", line 18, in <module>
from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
File "/usr/lib/python3/dist-packages/docutils/utils/error_reporting.py", line 47, in <module>
locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
File "/usr/lib/python3.4/locale.py", line 556, in getdefaultlocale
return _parse_localename(localename)
File "/usr/lib/python3.4/locale.py", line 484, in _parse_localename
raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: UTF-8
aws stderr: Nothing written
SSHKit::Command::Failed: aws exit status: 1
aws stdout: Traceback (most recent call last):
File "/usr/bin/aws", line 15, in <module>
import awscli.clidriver
File "/usr/share/awscli/awscli/clidriver.py", line 30, in <module>
from awscli.help import ProviderHelpCommand
File "/usr/share/awscli/awscli/help.py", line 20, in <module>
from docutils.core import publish_string
File "/usr/lib/python3/dist-packages/docutils/core.py", line 20, in <module>
from docutils import frontend, io, utils, readers, writers
File "/usr/lib/python3/dist-packages/docutils/frontend.py", line 41, in <module>
import docutils.utils
File "/usr/lib/python3/dist-packages/docutils/utils/__init__.py", line 20, in <module>
import docutils.io
File "/usr/lib/python3/dist-packages/docutils/io.py", line 18, in <module>
from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
File "/usr/lib/python3/dist-packages/docutils/utils/error_reporting.py", line 47, in <module>
locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
File "/usr/lib/python3.4/locale.py", line 556, in getdefaultlocale
return _parse_localename(localename)
File "/usr/lib/python3.4/locale.py", line 484, in _parse_localename
raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: UTF-8
aws stderr: Nothing written
Please help me identify what is going wrong here!
Shot in the dark (I'm not a Python dev), but you might be able add the following to deploy.rb:
set :default_env, {
'LANG' => 'en_US.UTF-8'
}
Derived mostly from https://github.com/matplotlib/matplotlib/issues/5420#issuecomment-154454607
I would check to see if you can run the command manually on the server. If you cannot, then figure out how to without Capistrano. If you can, perhaps see if there is some configuration in .bashrc or .bash_profile that can be added to the Capistrano config.

/gevent/hub.py: except Exception, ex: SyntaxError

Traceback (most recent call last):
File "main.py", line 4, in <module>
from bot import bot
File "/root/musicbot/bot.py", line 7, in <module>
from database import db, text_search
File "/root/musicbot/database.py", line 2, in <module>
import pymongo
File "/usr/local/lib/python3.5/site-packages/pymongo/__init__.py", line 92, in <module>
from pymongo.connection import Connection
File "/usr/local/lib/python3.5/site-packages/pymongo/connection.py", line 39, in <module>
from pymongo.mongo_client import MongoClient
File "/usr/local/lib/python3.5/site-packages/pymongo/mongo_client.py", line 46, in <module>
from pymongo import (auth,
File "/usr/local/lib/python3.5/site-packages/pymongo/pool.py", line 22, in <module>
from pymongo import thread_util
File "/usr/local/lib/python3.5/site-packages/pymongo/thread_util.py", line 31, in <module>
from gevent.lock import BoundedSemaphore as GeventBoundedSemaphore
File "/usr/local/lib/python3.5/site-packages/gevent/__init__.py", line 36, in <module>
from gevent.hub import get_hub, iwait, wait
File "/usr/local/lib/python3.5/site-packages/gevent/hub.py", line 282
except Exception, ex:
^
SyntaxError: invalid syntax
You are using a Python package which is for Python 2.x and uses old Exception syntax (gevent.hub).
You need to upgrade the violating module to Python 3.x compatible version.
If this is not possible then you need to deploy your application on Python 2.x.

Error when trying to compile chromium on Ubuntu 14.04

I am following this link to compile Chromium Browser and I successfully walked through each step but I get the following error at the 17th step: gclient sync:
mrgrj#mrgrj:~/chromium/buildhost/src$ gclient sync
Syncing projects: 4% ( 3/72) src/chrome/tools/test/reference_build/chrome_linSyncing projects: 5% ( 4/72) src/sdch/open-vcdiff Syncing projects: 100% (75/75), done.
________ running '/usr/bin/python src/build/landmines.py' in '/home/mrgrj/chromium/buildhost'
________ running '/usr/bin/python src/build/download_nacl_toolchains.py --mode nacl_core_sdk sync --extract' in '/home/mrgrj/chromium/buildhost'
Traceback (most recent call last):
File "src/build/download_nacl_toolchains.py", line 59, in <module>
sys.exit(Main(sys.argv[1:]))
File "src/build/download_nacl_toolchains.py", line 29, in Main
import package_version
File "/home/mrgrj/chromium/buildhost/src/native_client/build/package_version/package_version.py", line 40, in <module>
import argparse
ImportError: No module named argparse
Traceback (most recent call last):
File "/home/mrgrj/chromium/depot_tools/gclient.py", line 2313, in <module>
sys.exit(main(sys.argv[1:]))
File "/home/mrgrj/chromium/depot_tools/gclient.py", line 2299, in main
return dispatcher.execute(OptionParser(), argv)
File "/home/mrgrj/chromium/depot_tools/subcommand.py", line 252, in execute
return command(parser, args[1:])
File "/home/mrgrj/chromium/depot_tools/gclient.py", line 2056, in CMDsync
ret = client.RunOnDeps('update', args)
File "/home/mrgrj/chromium/depot_tools/gclient.py", line 1528, in RunOnDeps
self.RunHooksRecursively(self._options)
File "/home/mrgrj/chromium/depot_tools/gclient.py", line 983, in RunHooksRecursively
hook, cwd=self.root.root_dir, always=True)
File "/home/mrgrj/chromium/depot_tools/gclient_utils.py", line 293, in CheckCallAndFilterAndHeader
return CheckCallAndFilter(args, **kwargs)
File "/home/mrgrj/chromium/depot_tools/gclient_utils.py", line 538, in CheckCallAndFilter
rv, args, kwargs.get('cwd', None), None, None)
File "/home/mrgrj/chromium/depot_tools/subprocess2.py", line 37, in __init__
super(CalledProcessError, self).__init__(returncode, cmd, output=stdout)
TypeError: __init__() got an unexpected keyword argument 'output'
Any hints on how can I get rid of it ? I will update this post with any necesarry information that you'll need.
Update the python version to 2.7 or greater. One of the problems is that you don't have argparse which is on the newest version of python.

Categories