I am trying to install following packages in Ubuntu 14.04 but getting the following error:
ttf-mscorefonts-installer: downloading
http://downloads.sourceforge.net/corefonts/andale32.exe
Traceback (most recent call last):
File "/usr/lib/update-notifier/package-data-downloader", line 239, in
process_download_requests
dest_file = urllib.urlretrieve(files[i])[0]
File "/usr/lib/python2.7/urllib.py", line 94, in urlretrieve
return _urlopener.retrieve(url, filename, reporthook, data)
File "/usr/lib/python2.7/urllib.py", line 240, in retrieve
fp = self.open(url, data)
File "/usr/lib/python2.7/urllib.py", line 208, in open
return getattr(self, name)(url)
File "/usr/lib/python2.7/urllib.py", line 345, in open_http
h.endheaders(data)
File "/usr/lib/python2.7/httplib.py", line 969, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 829, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 791, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 772, in connect
self.timeout, self.source_address)
File "/usr/lib/python2.7/socket.py", line 553, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
IOError: [Errno socket error] [Errno -2] Name or service not known
Processing triggers for fontconfig (2.11.0-0ubuntu4.1) ...
Setting up ttf-mscorefonts-installer (3.4+nmu1ubuntu1) ...
I am working behind a proxy server but proxy settings are working fine for all other package installations. I am also getting this same error when installing flashplugin-installer. I have checked the environment variables i.e http_proxy, https_proxy and ftp_proxy and they are set with appropriate values.
I had this error with Mint 17 and it seems to occur in Ubuntu 14.04. It's a known bug (see here and here).
What I did to solve was:
sudo su
if you're proxy requires authentication:
export http_proxy=http://<username>:<password>#<your_proxy>:<proxy_port>
if i doesn't require authentication:
export http_proxy=http://<your_proxy>:<proxy_port>
and finally install the package like you would normally do
apt-get install <package_to_install>
or reinstall the package in case you already had install it
apt-get install --reinstall <package_to_install>
I tested with ttf-mscorefonts-installer but I guess that it should also work with flashplugin-installer.
Related
I have been using KiwiTCMS docker image installation. There were a crash lately and machine broke down. I do have Kiwi docker image 6.11 and backup for same image available.
Backup is made with command:
docker exec -it kiwi_web /Kiwi/manage.py dumpdata --all --indent 2 > database.json
KiwiTCMS is run up with
docker-compose up -d
Now when trying to restore the backup with sequence (docker-compose.yml is pointing to correct kiwi-web image, and SQL is pointing to kiwi-db 5.5 mariadb image), I get an error
# docker-compose up -d
# docker exec -it kiwi_web /Kiwi/manage.py migrate
# cat database.json | docker exec -i kiwi_web /Kiwi/manage.py loaddata --format json -
Error:
Traceback (most recent call last):
File "/venv/lib/python3.6/site-packages/django/db/models/options.py", line 565, in get_field
return self.fields_map[field_name]
KeyError: 'execution'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/venv/lib/python3.6/site-packages/django/core/serializers/json.py", line 69, in Deserializer
yield from PythonDeserializer(objects, **options)
File "/venv/lib/python3.6/site-packages/django/core/serializers/python.py", line 118, in Deserializer
field = Model._meta.get_field(field_name)
File "/venv/lib/python3.6/site-packages/django/db/models/options.py", line 567, in get_field
raise FieldDoesNotExist("%s has no field named '%s'" % (self.object_name, field_name))
django.core.exceptions.FieldDoesNotExist: LinkReference has no field named 'execution'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Kiwi/manage.py", line 12, in <module>
execute_from_command_line(sys.argv)
File "/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/venv/lib/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/venv/lib/python3.6/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/venv/lib/python3.6/site-packages/django/core/management/commands/loaddata.py", line 72, in handle
self.loaddata(fixture_labels)
File "/venv/lib/python3.6/site-packages/django/core/management/commands/loaddata.py", line 114, in loaddata
self.load_label(fixture_label)
File "/venv/lib/python3.6/site-packages/django/core/management/commands/loaddata.py", line 172, in load_label
for obj in objects:
File "/venv/lib/python3.6/site-packages/django/core/serializers/json.py", line 73, in Deserializer
raise DeserializationError() from exc
django.core.serializers.base.DeserializationError: Problem installing fixture '-':
How could I proceed to save the backupped data somehow?
Thank you very much,
-Mika
FieldDoesNotExist: LinkReference has no field named 'execution'
well this tells you what your error is! You are trying to restore a DB dump from version 6.11 onto a later version and that will not work because there have been [possibly multiple] changes in the database schema meanwhile.
docker-compose.yml is pointing to correct kiwi-web image
This is obviously not the case because LinkReference.execution field appeared in version 7.0, see https://kiwitcms.readthedocs.io/en/latest/changelog.html#id108
So to recap:
you are trying to restore a database dump from an older (or newer) version of Kiwi TCMS while the app server is running an incompatible version. This will not work.
Make sure your docker-compose.yml is using Kiwi TCMS v6.11 and not latest
Your options:
Figure out what fields have changed (from which version is your json dump) and modify the JSON structure to match - time consuming and prone to errors
Get yourself exactly the same old version of Kiwi TCMS and then restore the data onto it.
I'm using Appengine cron job to schedule cloud function and when I deploy and try to run a job, getting below error. Any idea what could be wrong here? Followed steps from [here][1]
(/base/alloc/tmpfs/dynamic_runtimes/python27/a7637d5531ec9deb_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py:263)
Traceback (most recent call last):
File "/base/alloc/tmpfs/dynamic_runtimes/python27/a7637d5531ec9deb_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/base/alloc/tmpfs/dynamic_runtimes/python27/a7637d5531ec9deb_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/base/alloc/tmpfs/dynamic_runtimes/python27/a7637d5531ec9deb_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "/base/data/home/apps/s~zion-hymns/20180222t221057.407849847593018575/main.py", line 18, in <module>
import pubsub_utils
File "/base/data/home/apps/s~zion-hymns/20180222t221057.407849847593018575/pubsub_utils.py", line 24, in <module>
import oauth2client.contrib.appengine as gae_oauth2client
File "./lib/oauth2client/contrib/appengine.py", line 36, in <module>
from oauth2client import client
File "./lib/oauth2client/client.py", line 39, in <module>
from oauth2client import transport
File "./lib/oauth2client/transport.py", line 255, in <module>
redirections=httplib2.DEFAULT_MAX_REDIRECTS,
AttributeError: 'module' object has no attribute 'DEFAULT_MAX_REDIRECTS'
[1]: https://firebase.googleblog.com/2017/03/how-to-schedule-cron-jobs-with-cloud.html?utm_campaign=culture_education_functions_en_06-29-17&utm_source=Firebase&utm_medium=yt-desc
Seems that I found the problem. Which version of Python your pip is using? In my case it was 3.6 despite the fact that the Python itself was 2.7
So the problem was that pip downloaded a Python 3.6 syntax version of httplib2, it was uploaded to the Google App Engine, which use Python 2.7. It tried to load in the module and fail miserably.
Try this :
Check the vesionn of your pip with :
pip -V
If you see some thing like pip 9.0.1 from /bla/bla/lib/python3.6/site-packages (python 3.6) then continue
Install pip for python 2.7 (it should be in the Python2.7 installation pachage under bin folder)
Remove old lib folder in your project
Run pip install -t lib -r requirements.txt (make sure that this pip is the right 2.7 version)
Deploy
By doing that you are using the right version of the lib and it should be working.
Hope it will help.
I am having this problem getting selenium to run with python3. The first is when I do:
from selenium import webdriver
driver = webdriver.Firefox()
I get the error geckodriver is not PATH. I downloaded geckodriver from https://github.com/mozilla/geckodriver/releases then create a directory called gecko and do
export PATH=$PATH:/home/ubuntu/gecko
I repeat the process of declaring the webdriver and then I got this error:
File "", line 1, in
File "/usr/local/lib/python3.4/dist-packages/selenium/webdriver/firefox/webdriver.py", line 135, in init
self.service.start()
File "/usr/local/lib/python3.4/dist-packages/selenium/webdriver/common/service.py", line 64, in start
stdout=self.log_file, stderr=self.log_file)
File "/usr/lib/python3.4/subprocess.py", line 859, in init
restore_signals, start_new_session)
File "/usr/lib/python3.4/subprocess.py", line 1457, in _execute_child
raise child_exception_type(errno_num, err_msg)
NotADirectoryError: [Errno 20] Not a directory
I already have xvfb installed for running the browser headless and issue the command xvfb-run python3 to start the python interactive shell. I am baffled as to why I continue to get this error message.
How do I solve it? Your help is much appreciated.
Thanks.
When running gcloud preview app run from Google Compute Engine, running Ubuntu Trust 14.04 image, I get the following error:
(Note: I fetched the complete gcloud SDK from https://cloud.google.com/sdk/)
$ gcloud preview app run appengine-modules-guestbook/src/main/webapp
Java module found in [/home/yaraju_gmail_com/appengine-modules-sample-java/appengine-modules-guestbook/src/main/webapp]
INFO: Skipping SDK update check.
INFO: Starting API server at: http://localhost:46920
INFO: Starting module "default" running at: http://localhost:8080
INFO: Starting admin server at: http://localhost:8000
Exception in thread Instance Adjustment:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/yaraju_gmail_com/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 1492, in _loop_adjusting_instances
self._adjust_instances()
File "/home/yaraju_gmail_com/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 1469, in _adjust_instances
self._add_instance(permit_warmup=True)
File "/home/yaraju_gmail_com/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 1354, in _add_instance
if not inst.start():
File "/home/yaraju_gmail_com/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/instance.py", line 274, in start
self._runtime_proxy.start()
File "/home/yaraju_gmail_com/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/http_runtime.py", line 270, in start
stderr=subprocess.PIPE)
File "/home/yaraju_gmail_com/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/safe_subprocess.py", line 132, in start_process_file
stderr=stderr)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
What can I do to fix this?
You might be missing one of the dependencies.
Ensure that you have run the following:
sudo apt-get install openjdk-7-jdk
gcloud components update gae-java
I'm having issues getting started using GAE (1.7.6 on OS X 10.6.8 with Python 2.7) and compared to amazon services it is abysmal. However, I would like to at least get the sample app deployed. After working through the other issues I now have a small sample application ready to deploy. When I try to deploy it, I receive an SSL error as follows:
*** Running appcfg.py with the following flags:
--no_cookies --email=mathsboy#gmail.com --passin update
02:15 PM Host: appengine.google.com
02:15 PM Application: tew-helloworld; version: 1
Traceback (most recent call last):
File "google_appengine/appcfg.py", line 171, in <module>
run_file(__file__, globals())
File "google_appengine/appcfg.py", line 167, in run_file
execfile(script_path, globals_)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 4155, in <module>
main(sys.argv)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 4146, in main
result = AppCfgApp(argv).Run()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2334, in Run
self.action(self)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 3881, in __call__
return method()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2892, in Update
updatecheck.CheckForUpdates()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/sdk_update_checker.py", line 258, in CheckForUpdates
runtime=runtime))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 393, in Send
f = self.opener.open(req)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 394, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 412, in _open
'_open', req)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 372, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1207, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/fancy_urllib/fancy_urllib/__init__.py", line 383, in do_open
url_error.reason.args[1])
fancy_urllib.InvalidCertificateException: Host appengine.google.com returned an invalid certificate (_ssl.c:503: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed):
To learn more, see http://code.google.com/appengine/kb/general.html#rpcssl
If deploy fails you might need to 'rollback' manually.
The "Make Symlinks..." menu option can help with command-line work.
*** appcfg.py has finished with exit code 1 ***
There was some advice on this in another thread stating that you would need to remove cacerts.txt, though I am unable to locate this file on OS X. Also, it seems retarded that in order to have the code upload I'd have to delete a cacert text file. But maybe I'm an idiot.
Another problem I'm facing here, is that OS X doesn't work well with GAE due to the difficulty in managing python versions. I've got a total mess on my hands now after installing multiple versions of python, EPD, ActiveState, MacPorts. None of these worked in solving me earlier problems despite assurances they would. It's really pretty appalling that this is the state of google's application management. It just seems like GAE was built by a bunch of guys from mid-90s microsoft....anyone advice on the above issue would be greatly appreciated. Cheers
Fourth line from end in your error. Relevant instructions under the link.
http://code.google.com/appengine/kb/general.html#rpcssl
Make sure (from documentation):
To do this you must have the ssl Python module installed on your system.
Workaround: Use the command line argument --skip_sdk_update_check=yes when you run dev_appserver.py.
I had the same problem and noticed the GUI tool (GoogleAppEngineLauncher) uses --skip_sdk_update_check=yes every time you start an app. This is as of SDK 1.8.7.
The root cause seems to be a known bug in the GAE development server's module whiltelisting system. Even if you have the ssl module installed (as the documentation says is required), ssl relies on _ssl, which is not whitelisted. This is why you can execute import ssl in a regular python shell session with no problem, but get an error when you execute the same line in a GAE app.