I have download the source code of Telegram app on their website:https://telegram.org/source.
When I try to run the project, there show an error like below:
UFW (M iphonesimulator): ERROR: Build failed
Traceback (most recent call last):
File "/Users/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 812, in <module>
run_build()
File "/Users/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 787, in run_build
add_symlinks_to_framework(project)
File "/Users/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 675, in add_symlinks_to_framework
attempt_symlink(os.path.join(base_dir, "Versions", "Current"), os.environ['FRAMEWORK_VERSION'])
File "/Users/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 493, in attempt_symlink
os.stat(os.path.abspath(os.path.join(link_path, "..", link_to)))
OSError: [Errno 2] No such file or directory: '/Users/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/Build/Products/Debug-iphonesimulator/MtProtoKit iOS.framework/Versions/A'
Showing first 200 notices only
Command /bin/sh failed with exit code 1
I didn't change anything before I try to run the project.
Telegram uses currently retired project https://github.com/kstenerud/iOS-Universal-Framework
Install 'iOS-Universal-Framework' and with couple of additional fixes you will be able to build it.
OSError: [Errno 2] No such file or directory: '/Users/macbookpro/Library/Developer/Xcode/DerivedData/MtProtoKit-afodmttritvhhdfajtdrsgmygsll/Build/Products/Debug-iphonesimulator/MtProtoKit iOS.framework/Versions/A'
You are referencing to a third party library that isn't there.
Related
I am packaging kivyMD app in Google colab. The app is source code of kitchen sink app from official github page of kivyMD.
Edit: Error occured after : !buildozer -v android debug
# Package the application
Traceback (most recent call last):
File "/usr/local/bin/buildozer", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/dist-packages/buildozer/scripts/client.py", line 13, in main
Buildozer().run_command(sys.argv[1:])
File "/usr/local/lib/python3.7/dist-packages/buildozer/__init__.py", line 1047, in run_command
self.target.run_commands(args)
File "/usr/local/lib/python3.7/dist-packages/buildozer/target.py", line 92, in run_commands
func(args)
File "/usr/local/lib/python3.7/dist-packages/buildozer/target.py", line 104, in cmd_debug
self.buildozer.build()
File "/usr/local/lib/python3.7/dist-packages/buildozer/__init__.py", line 205, in build
self.target.build_package()
File "/usr/local/lib/python3.7/dist-packages/buildozer/targets/android.py", line 990, in build_package
version = self.buildozer.get_version()
File "/usr/local/lib/python3.7/dist-packages/buildozer/__init__.py", line 701, in get_version
with open(fn) as fd:
FileNotFoundError: [Errno 2] No such file or directory: './../../kivymd/__init__.py'
Full Output + Error File
Info: File Structure is same as source code
What should I do to handle this error.
Thanks in Advance
Try the following command:
buildozer android debug deploy run logcat
For this command you have to use usb debugging with your phone .
I recently made a large swath of changes to a Python 3 project on Github, largely documentation and docstrings.
The tests pass locally, but when I push the branch to Github, Travis CI fails:
$ pytest
Traceback (most recent call last):
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/_pytest/config.py", line 342, in _getconftestmodules
return self._path2confmods[path]
KeyError: local('/home/travis/build/scossu/lakesuperior')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/_pytest/config.py", line 373, in _importconftest
return self._conftestpath2mod[conftestpath]
KeyError: local('/home/travis/build/scossu/lakesuperior/conftest.py')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/_pytest/config.py", line 379, in _importconftest
mod = conftestpath.pyimport()
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/py/_path/local.py", line 668, in pyimport
__import__(modname)
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/_pytest/assertion/rewrite.py", line 212, in load_module
py.builtin.exec_(co, mod.__dict__)
File "/home/travis/build/scossu/lakesuperior/conftest.py", line 6, in <module>
from lakesuperior.config_parser import test_config
ImportError: No module named 'lakesuperior.config_parser'
ERROR: could not load /home/travis/build/scossu/lakesuperior/conftest.py
The command "pytest" exited with 4.
lakesuperior is the main application package.
My .travis.yml:
language: python
python:
- "3.5"
- "3.6"
install:
- pip install -r requirements.txt
- coilmq&
script:
- pytest tests
The only thing that I think may have affected the import issue is that I added some __init__.py files to subpackages in order for Sphinx to discover API docs. I am not sure how that may have messed up CI though.
I verified that the previous commit passes all tests as it used to.
Has anybody encountered this scenario before? Any hints?
Thanks.
I recently had the same issue. I fixed it by removing the __init__.py file from the top level directory. See here.
I am working on a small testing project and wanted to add Robot Remoteserver onto an iOS device but can't get toolchain to build the package successfully. Here's the errors I get when I attempt to build this package:
copying build/lib/robotremoteserver.py -> /Users/usman/kivy/kivy-ios/build/robotremoteserver/i386/PythonRemoteServer-master/iosbuild/lib/python2.7/site-packages
byte-compiling /Users/usman/kivy/kivy-ios/build/robotremoteserver/i386/PythonRemoteServer-master/iosbuild/lib/python2.7/site-packages/robotremoteserver.py to robotremoteserver.pyc
writing byte-compilation script '/tmp/tmpM9XgVf.py'
/Users/usman/kivy/kivy-ios/dist/hostpython/bin/python -OO /tmp/tmpM9XgVf.py
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
removing /tmp/tmpM9XgVf.py
running install_egg_info
Removing /Users/usman/kivy/kivy-ios/build/robotremoteserver/i386/PythonRemoteServer-master/iosbuild/lib/python2.7/site-packages/robotremoteserver-devel-py2.7.egg-info
Writing /Users/usman/kivy/kivy-ios/build/robotremoteserver/i386/PythonRemoteServer-master/iosbuild/lib/python2.7/site-packages/robotremoteserver-devel-py2.7.egg-info
Traceback (most recent call last):
File "./toolchain.py", line 1224, in <module>
ToolchainCL()
File "./toolchain.py", line 1040, in __init__
getattr(self, args.command)()
File "./toolchain.py", line 1064, in build
build_recipes(args.recipe, ctx)
File "./toolchain.py", line 933, in build_recipes
recipe.execute()
File "/Users/usman/kivy/kivy-ios/toolchain.py", line 556, in execute
self.build_all()
File "/Users/usman/kivy/kivy-ios/toolchain.py", line 56, in _cache_execution
f(self, *args, **kwargs)
File "/Users/usman/kivy/kivy-ios/toolchain.py", line 668, in build_all
self.install()
File "/Users/usman/kivy/kivy-ios/toolchain.py", line 56, in _cache_execution
f(self, *args, **kwargs)
File "/Users/usman/kivy/kivy-ios/toolchain.py", line 794, in install
self.install_python_package()
File "/Users/usman/kivy/kivy-ios/toolchain.py", line 835, in install_python_package
dest_dir)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 171, in copytree
names = os.listdir(src)
OSError: [Errno 2] No such file or directory: '/Users/usman/kivy/kivy-ios/build/robotremoteserver/i386/PythonRemoteServer-master/iosbuild/lib/python2.7/site-packages/robotremoteserver'
For the line Could not find platform dependent libraries I did set the PYTHONPATH but still had this error.
Since there's no template to follow for the build script, I viewed the build files for the packages kivy comes with and created one that contains the following
from toolchain import PythonRecipe
class RobotRemoteServer(PythonRecipe):
version = "master"
url = "https://github.com/robotframework/PythonRemoteServer/archive/{version}.zip"
depends = ["python"]
recipe = RobotRemoteServer()
I have ensured Kivy and the packages it depends on are all installed correctly. I've also searched the web but can't quite figure out what the problem is. I'm using Xcode 6.4 and latest kivy pull from git. I have been stuck on this for a few days and appreciate any help or guidance.
Kivy recipes follow the same format as those for python-for-android. Here you have the related documentation.
I have downloaded the code source of Telegram app on their website. When I open the project in Xcode 6.1.1, I get the following error:
UFW (M iphonesimulator): ERROR: Build failed Traceback (most recent call last): File"/Users/yanfeng/Library/Developer/Xcode/DerivedData/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 812, in <module>run_build()File "/Users/yanfeng/Library/Developer/Xcode/DerivedData/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 787, in run_build
add_symlinks_to_framework(project)
File "/Users/yanfeng/Library/Developer/Xcode/DerivedData/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 675, in add_symlinks_to_framework
attempt_symlink(os.path.join(base_dir, "Versions", "Current"), os.environ['FRAMEWORK_VERSION'])
File "/Users/yanfeng/Library/Developer/Xcode/DerivedData/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 493, in attempt_symlink
os.stat(os.path.abspath(os.path.join(link_path, "..", link_to)))
OSError: [Errno 2] No such file or directory: '/Users/yanfeng/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/MtProtoKit iOS.framework/Versions/A'
Showing first 200 notices only
Command /bin/sh failed with exit code 1
MtProtoKit requires https://github.com/kstenerud/iOS-Universal-Framework, so clone it, install "Real Framework", restart Xcode and enjoy!
With Xcode 6, https://github.com/kstenerud/iOS-Universal-Framework is not required for building universal (arm64, armv7, armv7s, and simulator) frameworks for iOS.
You need to remove run script, fix library dependence and Xcode architectures configuration, also confirm architectures of linked binaries.
I maintained a working telegram iOS source code here: https://github.com/liruqi/Telegram-iOS
I just discovered forge and wanted to try it out at once. I closely followed the tutorial at http://docs.trigger.io/en/v1.3/getting-started.html#mac-and-linux-users and everything went fine, until I tried to actually run my app:
(forge-environment) forge run web
[ INFO] Forge tools running at version 3.3.2
[ INFO] Checking JavaScript files...
[ INFO] JavaScript check complete
[ INFO] Verifying your configuration settings...
[ INFO] Configuration settings check complete
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 504, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/mononofu/Programmieren/ArmorCalc/.template/generate_dynamic/utils.py", line 163, in runner
state.proc = lib.PopenWithoutNewConsole(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=kw.get('env'))
File "/home/mononofu/Programmieren/ArmorCalc/.template/generate_dynamic/lib.py", line 155, in __init__
self._old_popen.__init__(self, *args, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
(it doesn't actually crash, just hangs for a while, then quits with status 131)
This happens no matter how I try to run it (android, web). I'm on Ubuntu 12.04, everything updated. I didn't change anything from the defaults, just create and then build
Any ideas?
The underlying error was adb not being found to interact with the emulator / device: we've fixed the poor error message here so that other Linux users won't be stuck in the same way!