Appcelerator Titanium wont build projects (after time machine restore) - build

Ti.SDK 1.6.2
iOS 4.3
I recently got a new system and built it off of a time machine backup of my old system.
When I try to compile and run any app in the simulator I'm getting the following error returned to the console.
[INFO] One moment, building ...
Traceback (most recent call last):
File "/Library/Application Support/Titanium/mobilesdk/osx/1.6.2/iphone/builder.py", line 1342, in <module>
main(sys.argv)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.6.2/iphone/builder.py", line 505, in main
link_version = check_iphone_sdk(iphone_version)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.6.2/iphone/builder.py", line 48, in check_iphone_sdk
output = run.run(["xcodebuild","-showsdks"],True,False)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.6.2/iphone/run.py", line 7, in run
proc = subprocess.Popen(args, stderr=subprocess.STDOUT, stdout=subprocess.PIPE)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
OSError: [Errno 2] No such file or directory
It worked fine yesterday on the old system. I ran a backup before transferring and then installed the new system off of the most recent backup. Not sure why it would work on the old system and not the new.

I ended up reinstalling xcode as the error referenced python. This solved the problem.

try deleting everything in build/iphone. Do NOT delete the build/iphone directory, just everything IN it. Restart Ti Studio and rebuild.

Related

not able to build git hub project on ubuntu system, getting os error host alias not in environment

I have one Github project, I cloned it locally using pycharm IDE and installed all the packages to run the project successfully. When I try to build the solution, getting the exception as host alias is not in environment.
below is the exception detail.
`Unhandled exception in thread started by <function fn at 0x7fa22ef08e60>
Traceback (most recent call last):
File "./runner.py", line 20, in fn
subprocess.call(command.split(" "), cwd = directory)
File "/usr/lib/python2.7/subprocess.py", line 523, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
BUILD_NUMBER: 1390
FATAL ERROR: FEED_HOST_ALIAS not in environment
BUILD_NUMBER: 1390
FATAL ERROR: FEED_HOST_ALIAS not in environment
BUILD_NUMBER: 1390
FATAL ERROR: FEED_HOST_ALIAS not in environment`
OS version: Ubuntu 16.04 LTS
Python version: 2.7.10
Let's sort things out.
this is problem running the application. You don't "build" python applications
this seems to be a multithreaded application. Therefore there may be output from different threads.
in line 20 of your file ./runner.py you call subprocess.call().
that call internally calls some other things (Popen() and _execute_child()), but the final action is to raise an exception telling you No such file or directory.
since the subproces.call() call ends at that point, it is likely that the other output is from another thread. You could search your solution for the string 'FEED_HOST_ALIAS', but my guess is that this message is not directly related to the problem.
The problem is, as subprocess.call() reports, that the file you are asking to run does not exist. So set a breakpoint in runner.py at line 20 and have a look at what is passed as parameters. Then you should find out what happens. PyCharm lets you step into calls, so you might even want to check what happens inside subprocess.call() - or place a breakpoint somewhere within subprocess.py.

Running Tensorflow example for RNNs

I'm trying to run a code as described here.
I have a anaconda enviroment with tensorflow installed via pip installation.
When trying to run the example on the link provided I have a issue. The first one was that the file:ptb_word_lm.py wasn't present on my installation. I just copied the file from github and tried to run anyway. I got the following error when running python ptb_word_lm.py --data_path=/tmp/simple-examples/data/ --model small
error message:
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:105] Couldn't open CUDA library libcudnn.so. LD_LIBRARY_PATH: /lib/x86_64-linux-gnu:/home/danielmoreira/anaconda2:/home/danielmoreira/anaconda2/lib:/usr/local/cuda-7.5/lib64:
I tensorflow/stream_executor/cuda/cuda_dnn.cc:3448] Unable to load cuDNN DSO
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcurand.so locally
Traceback (most recent call last):
File "ptb_word_lm.py", line 361, in <module>
tf.app.run()
File "/home/danielmoreira/anaconda2/envs/tensorenv/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 30, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "ptb_word_lm.py", line 321, in main
train_input = PTBInput(config=config, data=train_data, name="TrainInput")
File "ptb_word_lm.py", line 85, in __init__
self.input_data, self.targets = reader.ptb_producer(
AttributeError: 'module' object has no attribute 'ptb_producer'
I have found people on google suggesting to change the line from tensorflow.models.rnn.ptb import reader to just import reader, but it doesn't seem to work for me.
Does anyone know the possible solution?
I'm using Python 2.7.12 and Tensorflow version seems to be 0.11.0rc2

virtualenv is not compatible with this system or executable

I am rather new to Linux (Ubuntu) and installing (Python) packages. I'm having trouble with mkvirtualenv and can not solve it:
~$ mkvirtualenv mysite70
New python executable in mysite70/bin/python
Traceback (most recent call last):
File "/usr/lib/python2.7/site.py", line 562, in <module>
main()
File "/usr/lib/python2.7/site.py", line 544, in main
known_paths = addusersitepackages(known_paths)
File "/usr/lib/python2.7/site.py", line 271, in addusersitepackages
user_site = getusersitepackages()
File "/usr/lib/python2.7/site.py", line 246, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/lib/python2.7/site.py", line 236, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/lib/python2.7/sysconfig.py", line 577, in get_config_var
return get_config_vars().get(name)
File "/usr/lib/python2.7/sysconfig.py", line 476, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/usr/lib/python2.7/sysconfig.py", line 355, in _init_posix
raise IOError(msg)
IOError: invalid Python installation: unable to open /home/sietse/.virtualenvs/mysite70/local/include/python2.7/pyconfig.h (No such file or directory)
ERROR: The executable mysite70/bin/python is not functioning
ERROR: It thinks sys.prefix is u'/home/usr/.virtualenvs' (should be u'/home/usr/.virtualenvs/mysite70')
ERROR: virtualenv is not compatible with this system or executable
Did I install something wrong?
This is likely a permissions error with your current logged in user on the Linux machine.
Try
sudo mkvirtualenv mysite70
This will often prompt for the password of the root user.
If that does not work, you may want to look at the article below:
http://noelusion.com/2013/Fixing-the-mysterious-virtualenv-error-IOError-invalid-Python-installation/
But note, that the article is a hack on a fairly specific instance.
I think I messed up the installation. I reinstalled Ubuntu, virtualenv etc. It works fine now.
Make sure your username has accents or special characters. If yes, change directory creating environments creating an environment variable WORKON_HOME with value equal to the new path. Ex .: C:\Envs

trigger.io error building "No module named generate_dynamic"

I seem to have a strange error when trying to build my app
Couldn't import generation code: No module named generate_dynamic
What is strange about this error is that I can seem to resolve the error if I uninstall and re-install trigger.io but if I make any changes tot he config the error comes back and I have to uninstall and re-install each time I make a change to the configs. It never used to do this.
Traceback (most recent call last):
File "C:\Users\Michael\AppData\Local\Trigger Toolkit\build-tools\forge\async.py", line 106, in run
result = self._target(*self._args, **self._kwargs)
File "C:\Users\Michael\AppData\Local\Trigger Toolkit\trigger\api\app.py", line 290, in package
build(cookies, path, target)
File "C:\Users\Michael\AppData\Local\Trigger Toolkit\trigger\api\app.py", line 329, in build
forge_main.development_build([target, '--general.interactive', 'no'])
File "C:\Users\Michael\AppData\Local\Trigger Toolkit\build-tools\forge\main.py", line 335, in development_build
manager.fetch_instructions()
File "C:\Users\Michael\AppData\Local\Trigger Toolkit\build-tools\forge\templates.py", line 90, in fetch_instructions
import_generate_dynamic(do_reload=True)
File "C:\Users\Michael\AppData\Local\Trigger Toolkit\build-tools\forge\build.py", line 48, in import_generate_dynamic
raise ForgeError("Couldn't import generation code: {0}".format(e))
ForgeError: Couldn't import generation code: No module named generate_dynamic
That is the debug. Note sure what is going on.
Thanks.
So it looks like its not resolved, I tried to update a module and the whole thing blew up again. I sent the logs to support so we will see how long this will take.
* Edit *
I was able to resolve this by deleting the trigger.Io directory ( the uninstall does not do this ) then reinstalling and importing my project again. Not sure what happened but it's working now
I deleted the .tempalte folder and re-built. Looks like the content of that folder got jacked during a failed or canceled build.

Errors while installing python packages

I 'm not able to install python packages from both pip and easy_install. There's some absurd kind of error that keeps popping up. Kindly help to rectify it.
I get the same errors while using python setup.py install.
Error while installing django-memcached
C:\Users\Praful\Desktop\django-redis-master>easy_install django-memcached
Traceback (most recent call last):
File "C:\Python27\Scripts\easy_install-script.py", line 9, in <module>
load_entry_point('distribute==0.6.27', 'console_scripts', 'easy_install')()
File "C:\Python27\lib\site-packages\distribute-0.6.27-py2.7.egg\setuptools\com
mand\easy_install.py", line 1915, in main
with_ei_usage(lambda:
File "C:\Python27\lib\site-packages\distribute-0.6.27-py2.7.egg\setuptools\com
mand\easy_install.py", line 1896, in with_ei_usage
return f()
File "C:\Python27\lib\site-packages\distribute-0.6.27-py2.7.egg\setuptools\com
mand\easy_install.py", line 1919, in <lambda>
distclass=DistributionWithoutHelpCommands, **kw
File "C:\Python27\lib\distutils\core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "C:\Python27\lib\site-packages\distribute-0.6.27-py2.7.egg\setuptools\dis
t.py", line 222, in __init__
for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
File "C:\Python27\lib\site-packages\distribute-0.6.27-py2.7.egg\pkg_resources.
py", line 486, in iter_entry_points
entries = dist.get_entry_map(group)
File "C:\Python27\lib\site-packages\distribute-0.6.27-py2.7.egg\pkg_resources.
py", line 2315, in get_entry_map
self._get_metadata('entry_points.txt'), self
File "C:\Python27\lib\site-packages\distribute-0.6.27-py2.7.egg\pkg_resources.
py", line 2101, in parse_map
raise ValueError("Entry points must be listed in groups")
ValueError: Entry points must be listed in groups
Error while installing python-memcache
C:\Users\Praful\Desktop\mem>python setup.py install
Traceback (most recent call last):
File "setup.py", line 24, in <module>
"Topic :: Software Development :: Libraries :: Python Modules",
File "C:\Python27\lib\distutils\core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "C:\Python27\lib\site-packages\distribute-0.6.27-py2.7.egg\setuptools\dis
t.py", line 222, in __init__
for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
File "C:\Python27\lib\site-packages\distribute-0.6.27-py2.7.egg\pkg_resources.
py", line 486, in iter_entry_points
entries = dist.get_entry_map(group)
File "C:\Python27\lib\site-packages\distribute-0.6.27-py2.7.egg\pkg_resources.
py", line 2315, in get_entry_map
self._get_metadata('entry_points.txt'), self
File "C:\Python27\lib\site-packages\distribute-0.6.27-py2.7.egg\pkg_resources.
py", line 2101, in parse_map
raise ValueError("Entry points must be listed in groups")
ValueError: Entry points must be listed in groups
Find get_entry_map(self, group=None): into python\Lib\sitepackages\pkg_resources\__init__.py. Insert after print self.egg_info
Run python setup.py and look to the last printed - broken package.
Remember it, later to install again. Delete the folder of broken
package and folder broken_package-version.dist-info. Run again paragraph 2, until the error disappears.
Remove changes from paragraph 1.
python setup.py install 'broken_package'
This error happened to me installing any package. My solution was going to my file explorer, typing in the path bar %appdata%, going to the Python folder, and deleting everything inside.
I found the same problem to be caused by a misfometted entry_points.txt file in one instelled egg of mine.
It can be quite hard to track down which one is if there are many.
I managed to find that little ba##!"d by creating and run setup.py for a dummy package:
setup.py
from setuptools import setup, find_packages
setup(
name = "IWillFindYou",
version = "0.1",
packages = find_packages()
)
run this in debug mode would point to this line in pkg_resources.py
def parse_map(cls, data, dist=None):
[...]
raise ValueError("Entry points must be listed in groups")
if you go back to the stack trace, you will see that parse_map is called here:
def get_entry_map(self, group=None):
[...]
ep_map = self._ep_map = EntryPoint.parse_map(
self._get_metadata('entry_points.txt'), self
)
evaluating self.egg_info will point up your evil egg so you can give a look to the entry_points.txt file.
If you are not handy with debugger, you may try to place print self.egg_info in get_entry_map and look to the last guy printed.
My Resolution Approach
Platform: windows 10, ConEmu-Maximus5
Delete virtual environment automatically created by poetry install command.
windows users can find the virtual environment folder in the path below
C:\Users\YOUR_PC_USERNAME\AppData\Local\pypoetry\Cache\virtualenvs
(don't know of linux path)
close terminal / command prompt
open terminal / command prompt and navigate to project folder
re run poetry install
I hope it helps...
How i encountered the error
It was my first time using poetry, while running poetry install, the process got interrupted. running the command again popped out the error.
Could be a problem with distribute. I'd recommend re-installing Python.