Build fail after updating to Mountain Lion - ios

Traceback (most recent call last): File "./Scripts/version.py", line 6, in <module>
from Foundation import NSMutableDictionary File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/Foundation/__init__.py", line 8, in <module>
import objc as _objc File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/objc/__init__.py", line 30, in <module>
from objc._bridgesupport import * File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/objc/_bridgesupport.py", line 9, in <module>
import pkg_resources File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 698, in <module>
class Environment(object): File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 701, in Environment
def __init__(self, search_path=None, platform=get_supported_platform(), python=PY_MAJOR): File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 96, in get_supported_platform
plat = get_build_platform(); m = macosVersionString.match(plat) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 222, in get_build_platform
plat = get_platform() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/util.py", line 98, in get_platform File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/sysconfig.py", line 498, in get_config_vars File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/sysconfig.py", line 407, in _init_posix distutils.errors.DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.7" but "10.8" during configure Command /bin/sh failed with exit code 1
I'm using python script for version control to TestFlight. While building I get some error. I don't know anything about python. What's the problem here?
XCode Version: 4.4
OS: Mountain Lion 10.8
MacBook PRO mid2009

This appears to be the key part of the message:
$MACOSX_DEPLOYMENT_TARGET mismatch: now "10.7" but "10.8" during
configure
Whatever toolset you are using was configured under Mountain Lion but is now running under Lion, and yet you claim the opposite.
You don't specify what toolset you are using, but it looks like you are going to have to set it up again under your new O/S.

It's a little wonky, but if you edit your .bash_profile and add:
export MACOSX_DEPLOYMENT_TARGET=10.8
You should be okay. I had this same problem when trying to run post-review.

I found the solution, go into your /System/Library/Frameworks/Python.framework/Versions/2.7/lib/distutils/sysconfig.py
Goto line 408 that says "raise DistutilsPlatformError" and add a '#' to comment out that line of code... This will "unleash the python"
You are basically telling python "don't worry its not 10.7, I know" there could be some crashes as a result but I think otherwise. My very complex python applicaiton now compiles on MacOSX 10.8 with no troubles and it seems to do the job, QA still has to test it though.
I am on MacBookPro 2012 MacOSX 10.8

Related

SyntaxError: future feature annotations is not defined for dockerize

Im trying to dockerize my project, but ran into the following error, not sure what is the error about.
Traceback (most recent call last):
File "server/main.py", line 5, in
from fastai.vision.all import *
File "/usr/local/lib/python3.6/site-packages/fastai/vision/all.py", line 1, in from . import models
File "/usr/local/lib/python3.6/site-packages/fastai/vision/models/init.py", line 1, in
from . import xresnet
File "/usr/local/lib/python3.6/site-packages/fastai/vision/models/xresnet.py", line 12, in
from ...torch_basics import *
File "/usr/local/lib/python3.6/site-packages/fastai/torch_basics.py", line 9, in
from .imports import *
File "/usr/local/lib/python3.6/site-packages/fastai/imports.py", line 30, in
from fastcore.all import *
File "/usr/local/lib/python3.6/site-packages/fastcore/all.py", line 3, in
from .dispatch import *
File "/usr/local/lib/python3.6/site-packages/fastcore/dispatch.py", line 4
from future import annotations
^
SyntaxError: future feature annotations is not defined
Im doing this on VSCode
Managed to trouble shoot the problem and resolved it.
For python version issue
Dockerfile to change python version from 3.6 to 3.10
for the various requirement issue
update requirement.txt to latest versions as prompted by the terminal as you run the dockerize process in the terminal.
hope this helps for all future people who encounters the same problem

Python test fails printing dependency on local package

I thought that bazel runs tests in sandbox, but recently I got an error pointing to a local module /usr/lib/python3/dist-packages/OpenSSL/SSL.py. It it correct? How to make bazel run in a sandbox?
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //master:master_impl_test
-----------------------------------------------------------------------------
Traceback (most recent call last):
File "/home/agent/.cache/bazel/_bazel_agent/374e3bc824f25540df2be790dbb8f41e/sandbox/linux-sandbox/1/execroot/__main__/bazel-out/k8-fastbuild/bin/master/master_impl_test.runfiles/__main__/master/master_impl_test.py", line 14, in <module>
from master import master_impl
File "/home/agent/.cache/bazel/_bazel_agent/374e3bc824f25540df2be790dbb8f41e/sandbox/linux-sandbox/1/execroot/__main__/bazel-out/k8-fastbuild/bin/master/master_impl_test.runfiles/__main__/master/master_impl.py", line 20, in <module>
from azure.cosmos import cosmos_client
File "/home/agent/.cache/bazel/_bazel_agent/374e3bc824f25540df2be790dbb8f41e/sandbox/linux-sandbox/1/execroot/__main__/bazel-out/k8-fastbuild/bin/master/master_impl_test.runfiles/py_deps/pypi__azure_cosmos/azure/cosmos/cosmos_client.py", line 25, in <module>
import requests
File "/home/agent/.cache/bazel/_bazel_agent/374e3bc824f25540df2be790dbb8f41e/sandbox/linux-sandbox/1/execroot/__main__/bazel-out/k8-fastbuild/bin/master/master_impl_test.runfiles/py_deps/pypi__requests/requests/__init__.py", line 95, in <module>
from urllib3.contrib import pyopenssl
File "/home/agent/.cache/bazel/_bazel_agent/374e3bc824f25540df2be790dbb8f41e/sandbox/linux-sandbox/1/execroot/__main__/bazel-out/k8-fastbuild/bin/master/master_impl_test.runfiles/py_deps/pypi__urllib3/urllib3/contrib/pyopenssl.py", line 46, in <module>
import OpenSSL.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/SSL.py", line 675, in <module>
_lib.Cryptography_HAS_TLSEXT_HOSTNAME, "SNI not available"
AttributeError: module 'lib' has no attribute 'Cryptography_HAS_TLSEXT_HOSTNAME'
Today my project's CI get this error. I fixed this problem in my project, just upgrading pyOpenSSL library to latest version.
Old requirements-file.txt:
requests
pyOpenSSL==19.0.0
urllib3==1.25.3
New requirements-file.txt:
cffi==1.14.4
cryptography==3.3
pycparser==2.20
pyOpenSSL==20.0.0
six==1.15.0
urllib3==1.25.3

Console problem in Spyder showing: an error ocurred while starting the kernel [duplicate]

Spyder console is showing an error msg:
An error ocurred while starting the kernel
Traceback (most recent call last): File "C:\Users\ABCD\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "C:\Users\ABCD\Anaconda3\lib\runpy.py",
line 85, in _run_code exec(code, run_globals) File "C:\Users\ABCD\Anaconda3\lib\site‑packages\spyder_kernels\console\__main__.py",
line 11, in start.main() File "C:\Users\ABCD\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py",
line 287, in main import_spydercustomize() File "C:\Users\ABCD\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py",
line 39, in import_spydercustomize import spydercustomize File "C:\Users\ABCD\Anaconda3\lib\site‑packages\spyder_kernels\customize\spydercustomize.py",
line 27, in from IPython.core.getipython import get_ipython File "C:\Users\ABCD\Anaconda3\lib\site‑packages\IPython\__init__.py",
line 55, in from .terminal.embed import embed File "C:\Users\ABCD\Anaconda3\lib\site‑packages\IPython\terminal\embed.py",
line 17, in from IPython.terminal.ipapp import load_default_config File "C:\Users\ABCD\Anaconda3\lib\site‑packages\IPython\terminal\ipapp.py",
line 28, in from IPython.core.magics import ( File "C:\Users\ABCD\Anaconda3\lib\site‑packages\IPython\core\magics\__init__.py",
line 18, in from .code import CodeMagics, MacroToEdit File "C:\Users\ABCD\Anaconda3\lib\site‑packages\IPython\core\magics\code.py",
line 23, in from urllib.request import urlopen File "C:\Users\ABCD\Anaconda3\lib\urllib\request.py",
line 86, in import email File "C:\Users\ABCD\email.py",
line 8, in n=input() EOFError: EOF when reading a line
What I understood on reading other threads about similar kind of problems , that this is due to having two python versions installed
So, I tried manually removing all python files (as I was unable to uninstall python) and then uninstalled and reinstalled anaconda (spyder) but the problem persists
Any kind of help wd be appreciated
Short answer: To fix this problem, you need to remove or rename this file:
C:\Users\ABCD\email.py
Long answer: That file has the same name of a core Python module. Since it's placed in your home directory, it has higher priority than that module, which makes Python to use it first and ends up causing the error.

Unable to run tune_blockmatcher and image_to_pointcloud programs

I am able to capture images on webcams and calibrate them well using
StereoVision library from erget.
But, while trying for execution of tune_blockmatcher and images_to_pointcloud, i found below errors as StereoBM and StereoSGBM classes are unable to import.
>import cv2
>from stereovision.blockmatchers import StereoBM, StereoSGBM
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\stereovision\blockmatchers.py", line 111,
in <module>
class StereoBM(BlockMatcher):
File "C:\Python27\lib\site-packages\stereovision\blockmatchers.py", line 117,
in StereoBM
"stereo_bm_preset": cv2.STEREO_BM_NARROW_PRESET}
AttributeError: 'module' object has no attribute 'STEREO_BM_NARROW_PRESET'
>`
C:\s\StereoVision-master\stereovision>python tune_blockmatcher.py
Traceback (most recent call last):
File "tune_blockmatcher.py", line 34, in <module>
from stereovision.blockmatchers import StereoBM, StereoSGBM
File "build\bdist.win-amd64\egg\stereovision\blockmatchers.py", line 111, in <
module>
class StereoBM(BlockMatcher):
File "build\bdist.win-amd64\egg\stereovision\blockmatchers.py", line 117, in S
tereoBM
"stereo_bm_preset": cv2.STEREO_BM_NARROW_PRESET}
AttributeError: 'module' object has no attribute 'STEREO_BM_NARROW_PRESET'
OS i am running is Windows7, running OPENCV 3.4.0 and Python2.7, installed stereovision library with 'pip install StereoVision'
Any solution for this issue ?
You are facing this issue because the StereoVision framework provided by Daniel Lee does not work with OpenCV 3.
First of all, uninstall OpenCV 3 from your machine.
Then install OpenCV 2 and retry: your problem will be gone.
Hope this helps

Running html5 app template in ubuntu sdk failed?

My configuration :
Ubuntu 14.04 LTS
64bit
Qtcreator 3.1.1
everything is up-to-date
Hello everyone,
I'm trying to just compile and run an HTML5 App for ubuntu Phone, but after trying and searching for a week now, I still can't make it run !
For the moment I just want to run the simple html5 app template.
This is the situation :
I have installed ubuntu sdk as instructed in https://developer.ubuntu.com/en/start/ubuntu-sdk/installing-the-sdk/
I've created in the run click menu, an i386 build target. (15.04) --- which exited with no errors
I created an i386 emulator in devices --> i386 - devel - default password --- which is finally up and running correctly
The problem is when I compile the default template : theses are the errors I get :
desktop_Exec(app): found unexpected Exec with architecture 'all':./qtc_device_debughelper.py
security_policy_groups_safe_app(debug):(REJECT)reserved policy group 'debug':not for production use
security_policy_version_matches_framework(app.apparmor):invalid framework 'ubuntu-core-15.04'
And when I try to edit it anyway :
This is what I get :
Traceback (most recent call last):
File "/tmp/qtc_device_applaunch.py", line 29, in <module>
gi.Repository.get_default().require("UbuntuAppLaunch")
gi.RepositoryError: Typelib file for namespace 'UbuntuAppLaunch' (any version) not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 2158, in _find_spec
AttributeError: 'DynamicImporter' object has no attribute 'find_spec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/qtc_device_applaunch.py", line 33, in <module>
from gi.repository import UpstartAppLaunch as UAL
File "/usr/lib/python3/dist-packages/gi/importer.py", line 53, in find_module
'introspection typelib not found' % namespace)
ImportError: cannot import name UpstartAppLaunch, introspection typelib not found
I have been looking for this everywhere but I couldn't find something that works.
I need some of your knowledge to help me understand all this!
I have the same errors. I think that the 'ubuntu-core-15.04'-error is related to the version of Ubuntu you are using. I use Mint 17, which is based on Ubuntu 14.04. Canonical recommends the newer Ubuntu Versions for app-developing, because there is some stuff in it they changed.
unfortunately, I can't help you with the other errors.

Resources