global name 'self' is not defined - titanium-mobile

[ERROR] Application Installer abnormal process termination. Process exit value was 1
[INFO] logfile = C:\Documents and Settings\Administrator\My Documents\Titanium_Studio_Workspace\Todo List\build.log
[DEBUG] C:\Documents and Settings\Administrator\Application Data\Titanium\mobilesdk\win32\3.0.2.GA\android\builder.py simulator Todo List E:\New SDK C:\Documents and Settings\Administrator\My Documents\Titanium_Studio_Workspace\Todo List com.appcelerator.sample.todo 7 WVGA854
Traceback (most recent call last):
File "C:\Documents and Settings\Administrator\Application Data\Titanium\mobilesdk\win32\3.0.2.GA\android\builder.py", line 2340, in <module>
builder = Builder(project_name,sdk_dir,project_dir,template_dir,app_id)
File "C:\Documents and Settings\Administrator\Application Data\Titanium\mobilesdk\win32\3.0.2.GA\android\builder.py", line 355, in __init__
self.set_java_commands()
File "C:\Documents and Settings\Administrator\Application Data\Titanium\mobilesdk\win32\3.0.2.GA\android\builder.py", line 399, in set_java_commands
commands = java.find_java_commands()
File "C:\Documents and Settings\Administrator\Application Data\Titanium\mobilesdk\win32\3.0.2.GA\android\java.py", line 61, in find_java_commands
java_home = os.path.dirname(os.path.dirname(self.javac))
NameError: global name 'self' is not defined
Note: when i run simple application in titanium studio it throws this error. i am totaly new in titanium.so guys, please help me for solving this problem.

It seems that environment variable JAVA HOME is not present. The error says that it's not possible to call javac because 'self' is not set. 'self' in this case should be java home.
http://docs.appcelerator.com/titanium/latest/#!/guide/Setting_up_Titanium_Studio
http://docs.appcelerator.com/titanium/latest/#!/guide/Software_Locations_and_Environment_Variables

Related

Seems Ansible failed to get the temp files

Ansible failed while running the tasks and referring file/folder not exists in the ansible temp folder of a target machine. It has been working fine and not sure why all of sudden it stopped working
changed : false
module_stderr : Shared connection to 10.131.132.11 closed.\r\n
module_stdout : Traceback (most recent call last):\r\n File \"/root/.ansible/tmp/ansible-tmp-1662460628.845051-105063944436404/AnsiballZ_setup.py\", line 113, in <module>\r\n try:\r\n File \"/root/.ansible/tmp/ansible-tmp-1662460628.845051-105063944436404/AnsiballZ_setup.py\", line 98, in _ansiballz_main\r\n json_params = f.read()\r\n File \"/usr/lib64/python2.7/tempfile.py\", line 321, in mkdtemp\r\n dir = gettempdir()\r\n File \"/usr/lib64/python2.7/tempfile.py\", line 265, in gettempdir\r\n tempdir = _get_default_tempdir()\r\n File \"/usr/lib64/python2.7/tempfile.py\", line 212, in _get_default_tempdir\r\n (\"No usable temporary directory found in %s\" % dirlist))\r\nIOError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/root']\r\n
msg : MODULE FAILURE\nSee stdout/stderr for the exact error
rc : 1
You can start by checking the permissions if they changed.
I think the disk is probably full. I had the same issue and it was the case.
You can type df -h
Also you can verify the inode.
You can type df -i

ffmpeg-normalize exits with OSError: [WinError 193] %1 is not a valid Win32 application

I have a large number of files I want to normalize the volume with a simple method using a basic loop.
When trying to use ffmpeg-normalize the application exits with the error. I searched the error on-line but I can't find any issue similar to mine. I thought it may be a 'path' or file type association problem but they look ok.
Can anyone give me an explanation for this error and a possible fix for it please?
D:\Test>ffmpeg-normalize.exe in.mkv -o out.mkv
Traceback (most recent call last):
File "c:\users\les\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\les\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Les\AppData\Local\Programs\Python\Python39\Scripts\ffmpeg-normalize.exe\__main__.py", line 7, in <module>
File "c:\users\les\appdata\local\programs\python\python39\lib\site-packages\ffmpeg_normalize\__main__.py", line 409, in main
ffmpeg_normalize = FFmpegNormalize(
File "c:\users\les\appdata\local\programs\python\python39\lib\site-packages\ffmpeg_normalize\_ffmpeg_normalize.py", line 68, in __init__
self.has_loudnorm_capabilities = ffmpeg_has_loudnorm()
File "c:\users\les\appdata\local\programs\python\python39\lib\site-packages\ffmpeg_normalize\_cmd_utils.py", line 185, in ffmpeg_has_loudnorm
cmd_runner.run_command()
File "c:\users\les\appdata\local\programs\python\python39\lib\site-packages\ffmpeg_normalize\_cmd_utils.py", line 101, in run_command
p = subprocess.Popen(
File "c:\users\les\appdata\local\programs\python\python39\lib\subprocess.py", line 947, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "c:\users\les\appdata\local\programs\python\python39\lib\subprocess.py", line 1416, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
OSError: [WinError 193] %1 is not a valid Win32 application
D:\Test>path
PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Calibre2\;C:\Program Files (x86)\Calibre2\;C:\Users\Les\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\Les\AppData\Local\Programs\Python\Python39\;C:\Users\Les\AppData\Local\Microsoft\WindowsApps;D:\MABS\local64\bin-video;C:\Program Files (x86)\sox-14-4-2
D:\Test>ftype python.file
python.file="C:\Users\Les\AppData\Local\Programs\Python\Python39\python.exe" "%1"
D:\Test>python.exe
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32
ffmpeg -version
ffmpeg version N-100483-g728b83a7c4-gd67c6c7f6f+4 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
D:\Test>ffmpeg-normalize --version
ffmpeg-normalize v1.22.1
I had this exact same error. I had a ffmpeg version built using the "media-autobuild suite". Inside my ffmpeg install folder there was a standalone file named "ffmpeg". When typing "where ffmpeg" in the command prompt, it showed both "ffmpeg" and "ffmpeg.exe". The "ffmpeg" file is a bash script that I'm not sure what it does. I simply renamed the bash script file to something different and restarted my command prompt and the ffmpeg-normalize now worked without the error.

Volttron on MacOS issue with vcfg

Running into the issue below while trying to run vcfg command in Volttron on my Mac use iTerm. Any help would be much appreciated.
'''
(volttron)cg#Carolyns-MacBook-Pro volttron % vcfg
Your VOLTTRON_HOME currently set to: /Users/cg/.volttron
Is this the volttron you are attempting to setup? [Y]:
Message bus set to zmq
What is the vip address? [tcp://127.0.0.1]:
What is the port for the vip address? [22916]:
Is this instance web enabled? [N]: Y
Traceback (most recent call last):
File "/Users/cg/volttron/env/bin/vcfg", line 11, in <module>
load_entry_point('volttron', 'console_scripts', 'vcfg')()
File "/Users/cg/volttron/volttron/platform/config.py", line 593, in _main
main()
File "/Users/cg/volttron/volttron/platform/instance_setup.py", line 862, in main
wizard()
File "/Users/cg/volttron/volttron/platform/instance_setup.py", line 748, in wizard
do_web_enabled_zmq(volttron_home)
File "/Users/cg/volttron/volttron/platform/instance_setup.py", line 433, in do_web_enabled_zmq
'https://' + get_hostname())
File "/Users/cg/volttron/volttron/utils/__init__.py", line 27, in get_hostname
with open('/etc/hostname') as fp:
IOError: [Errno 2] No such file or directory: '/etc/hostname'
'''
/etc/hostname does not exist on Mac. The documentation for Volttron indicates that it only supports Linux operating systems.. It seems like you'll have to use a Linux host (or use virtualization).

`ansible --version` command throws an ERROR

Good Day guys
I have installed ansible on my mac, it was successfully installed but then when I run the command ansible --version it throws me a n error:
Unhandled error:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/ansible/config/manager.py", line 559, in update_config_data
value, origin = self.get_config_value_and_origin(config, configfile)
File "/Library/Python/2.7/site-packages/ansible/config/manager.py", line 503, in get_config_value_and_origin
value = ensure_type(value, defs[config].get('type'), origin=origin)
File "/Library/Python/2.7/site-packages/ansible/config/manager.py", line 124, in ensure_type
value = tempfile.mkdtemp(prefix=prefix, dir=value)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tempfile.py", line 339, in mkdtemp
_os.mkdir(file, 0700)
OSError: [Errno 13] Permission denied: '/Users/patrick/.ansible/tmp/ansible-local-37505vvsQNX'
Traceback (most recent call last):
File "/usr/local/bin/ansible", line 62, in <module>
import ansible.constants as C
File "/Library/Python/2.7/site-packages/ansible/constants.py", line 174, in <module>
config = ConfigManager()
File "/Library/Python/2.7/site-packages/ansible/config/manager.py", line 291, in __init__
self.update_config_data()
File "/Library/Python/2.7/site-packages/ansible/config/manager.py", line 571, in update_config_data
raise AnsibleError("Invalid settings supplied for %s: %s\n" % (config, to_native(e)), orig_exc=e)
ansible.errors.AnsibleError: Invalid settings supplied for DEFAULT_LOCAL_TMP: [Errno 13] Permission denied: '/Users/patrick/.ansible/tmp/ansible-local-37505vvsQNX'
Appreciate your help guys.
Check if this is similar to iiab/iiab/issue 1212:
After some more digging, I found the real source of this problem was hardcoded paths in ansible.cfg
Or the more recent ansible/galaxy-dev issue 107, which leads to PR 110:
The default ansible temp dir ~/.ansible/tmp is accessed by ansible-doc via the galaxy-importer.
This works OK in the galaxy-dev local env, but on the CI environment it attempts to create dir /.ansible/tmp and fails.
This PR changes the default ansible temp dir to /tmp/ansible which is outside the user home (and in the local env, /tmp has greater permissions)
Try and change DEFAULT_LOCAL_TMP to /tmp.
~/.ansible/tmp is probably root, so not accessible. chown it to user
I have disabled 'gathering' in ansible.cfg to fix the issue.
# gathering = False
Below error occurring before commenting this.
~ % ansible
Unhandled error:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/ansible/6.6.0/libexec/lib/python3.10/site-packages/ansible/config/manager.py", line 627, in update_config_data
value, origin = self.get_config_value_and_origin(config, configfile)
File "/opt/homebrew/Cellar/ansible/6.6.0/libexec/lib/python3.10/site-packages/ansible/config/manager.py", line 586, in get_config_value_and_origin
raise AnsibleOptionsError('Invalid value "%s" for configuration option "%s", valid values are: %s' %
ansible.errors.AnsibleOptionsError: Invalid value "False" for configuration option "setting: DEFAULT_GATHERING ", valid values are: implicit, explicit, smart

AssertionError when cloning Anaconda base environment

I'm trying to create a clone of my base anaconda environment for a specific application. I want to use the clone as the base off of which to install application-specific packages. I used the following command to start the clone:
C:\Users\Liam>conda create -n retrievals --clone base
It made it a long way through the cloning process, and had just reach 100% on cloning anaconda-5.2.0, when it threw the assertion error below:
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:\Users\Liam\Anaconda3\lib\site-packages\conda\exceptions.py", line 819, in __call__
return func(*args, **kwargs)
File "C:\Users\Liam\Anaconda3\lib\site-packages\conda\cli\main.py", line 78, in _main
exit_code = do_call(args, p)
File "C:\Users\Liam\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 77, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "C:\Users\Liam\Anaconda3\lib\site-packages\conda\cli\main_create.py", line 11, in execute
install(args, parser, 'create')
File "C:\Users\Liam\Anaconda3\lib\site-packages\conda\cli\install.py", line 211, in install
clone(args.clone, prefix, json=context.json, quiet=context.quiet, index_args=index_args)
File "C:\Users\Liam\Anaconda3\lib\site-packages\conda\cli\install.py", line 72, in clone
index_args=index_args)
File "C:\Users\Liam\Anaconda3\lib\site-packages\conda\misc.py", line 277, in clone_env
force_extract=False, index_args=index_args)
File "C:\Users\Liam\Anaconda3\lib\site-packages\conda\misc.py", line 78, in explicit
assert not any(spec_pcrec[1] is None for spec_pcrec in specs_pcrecs)
AssertionError
$ C:\Users\Liam\Anaconda3\Scripts\conda create -n retrievals --clone base
Can anybody explain why this is happening and what I could try to fix it?
P.S. I'm doing this on Windows 10 if that helps at all.
I found workaround for it. You can just copy environment with base name.
cp -r /opt/conda/envs/base_env /opt/conda/envs/new_env
After that you can activate or update environment.
conda activate new_env
conda env update --name new_env --file environment.yaml --prune

Resources