Emscripten "Permission Denied" even when I sudo enmake - makefile

I'm playing around with emscripten and I keep getting this confusing message
|[413077]-$>../emmake Makefile
Error: Exception thrown when invoking Popen in make with args: "Makefile"!
Traceback (most recent call last):
File "../emmake", line 24, in <module>
shared.Building.make(sys.argv[1:])
File "/Users/jkirchartz/Dropbox/emscripten/tools/shared.py", line 670, in make
Popen(args, stdout=stdout, stderr=stderr, env=env).communicate()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
but even if I use sudo I get the same error:
|[254829]-$>sudo !!
sudo ../emmake Makefile
Password:
Error: Exception thrown when invoking Popen in make with args: "Makefile"!
Traceback (most recent call last):
File "../emmake", line 24, in <module>
shared.Building.make(sys.argv[1:])
File "/Users/jkirchartz/Dropbox/emscripten/tools/shared.py", line 670, in make
Popen(args, stdout=stdout, stderr=stderr, env=env).communicate()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
I'm on the sudoer's list, I have root access... but no matter what I do I get permission denied. Any ideas?

emmake expects the make executable as parameter, not Makefile. Just try ../emmake make.

All Building.make() does is call make. Check if you can run make yourself manually on the command line.

Related

`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

Kivy installation and UnicodeDecodeError

I'm trying to instal Kivy on my Windows 10 Polish language.
Python 3.8
PIP 19.3.1
When i get to step:
python -m virtualenv kivy_venv
im getting error:
C:\Users\Paweł>python -m virtualenv kivy_venv
Using base prefix 'C:\\Python\\Python38-32'
New python executable in C:\Users\Paweł\kivy_venv\Scripts\python.exe
Installing setuptools, pip, wheel...
done.
Traceback (most recent call last):
File "C:\Python\Python38-32\lib\site-packages\virtualenv.py", line 939, in call_subprocess
line = line.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb3 in position 42: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python\Python38-32\lib\runpy.py", line 192, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Python\Python38-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python\Python38-32\lib\site-packages\virtualenv.py", line 2634, in <module>
main()
File "C:\Python\Python38-32\lib\site-packages\virtualenv.py", line 860, in main
create_environment(
File "C:\Python\Python38-32\lib\site-packages\virtualenv.py", line 1179, in create_environment
install_wheel(to_install, py_executable, search_dirs, download=download)
File "C:\Python\Python38-32\lib\site-packages\virtualenv.py", line 1023, in install_wheel
_install_wheel_with_search_dir(download, project_names, py_executable, search_dirs)
File "C:\Python\Python38-32\lib\site-packages\virtualenv.py", line 1116, in _install_wheel_with_search_dir
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=script)
File "C:\Python\Python38-32\lib\site-packages\virtualenv.py", line 941, in call_subprocess
line = line.decode(fs_encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb3 in position 42: invalid start byte
I couldn't find solution to this version of python or pip that's why i ask for help.
If you have any ideas please let me know.
Thanks
Find solution
Control panel regional settings Beta: Use Unicode UTF-8 for worldwide language support must be tick.
Use Unicode UTF-8

Odoo10 Working setup now failing with ImportError: No module named conf

Working setup failing with ImportError: No module named conf
I stopped test setup on localhost with ^c to check logs
on restart I am getting error
C:\Odoo 10.0\server>odoo-bin -d todo -i todo_app --test-enable --dev=all
Traceback (most recent call last):
File "odoo-bin", line 2, in <module>
File "pkg_resources\__init__.pyc", line 2203, in declare_namespace
File "pkg_resources\__init__.pyc", line 2219, in declare_namespace
File "pkg_resources\__init__.pyc", line 2186, in _handle_ns
File "pkgutil.pyc", line 246, in load_module
argument should be the name of a package, in standard module format
File "C:\Odoo 10.0\server\odoo\__init__.py", line 61, in <module>
import conf
ImportError: No module named conf
TEST - Create folder conf with init.py from github
RESULT
C:\Odoo 10.0\server>odoo-bin -d todo -i todo_app --test-enable --dev=all
Traceback (most recent call last):
File "odoo-bin", line 2, in <module>
File "pkg_resources\__init__.pyc", line 2203, in declare_namespace
File "pkg_resources\__init__.pyc", line 2219, in declare_namespace
File "pkg_resources\__init__.pyc", line 2186, in _handle_ns
File "pkgutil.pyc", line 246, in load_module
argument should be the name of a package, in standard module format
File "C:\Odoo 10.0\server\odoo\__init__.py", line 61, in <module>
import conf
File "C:\Odoo 10.0\server\odoo\conf\__init__.py", line 15, in <module>
import deprecation
ImportError: No module named deprecation
CONCLUSION - Something happened to module conf - but I do not know what as I have made no such changes - John
I think you are using python 3.x .
this problem happened to me on linux but after using python 2.7.x it started as normal.

Golang: Preview of managed VM app returns error

I'm trying to preview a Go docker (App Engine ManagedVM) app using the gcloud preview app run command.
But I keep getting this error:
Traceback (most recent call last):
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 83, in <module>
_run_file(__file__, globals())
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 79, in _run_file
execfile(_PATHS.script_file(script_name), globals_)
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 985, in <module>
main()
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 978, in main
dev_server.start(options)
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 774, in start
self._dispatcher.start(options.api_host, apis.port, request_data)
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/dispatcher.py", line 182, in start
_module, port = self._create_module(module_configuration, port)
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/dispatcher.py", line 262, in _create_module
threadsafe_override=threadsafe_override)
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 1463, in __init__
super(ManualScalingModule, self).__init__(**kwargs)
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 514, in __init__
self._module_configuration)
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 237, in _create_instance_factory
module_configuration=module_configuration)
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/vm_runtime_factory.py", line 78, in __init__
timeout=self.DOCKER_D_REQUEST_TIMEOUT_SECS)
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/docker/containers.py", line 740, in NewDockerClient
client.ping()
File "/Users/jwesonga/google-cloud-sdk/./lib/docker/docker/client.py", line 711, in ping
return self._result(self._get(self._url('/_ping')))
File "/Users/jwesonga/google-cloud-sdk/./lib/docker/docker/client.py", line 76, in _get
return self.get(url, **self._set_request_timeout(kwargs))
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/lib/requests/requests/sessions.py", line 468, in get
return self.request('GET', url, **kwargs)
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/lib/requests/requests/sessions.py", line 456, in request
resp = self.send(prep, **send_kwargs)
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/lib/requests/requests/sessions.py", line 559, in send
r = adapter.send(request, **kwargs)
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/lib/requests/requests/adapters.py", line 384, in send
raise Timeout(e, request=request)
requests.exceptions.Timeout: (<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10631c7d0>, 'Connection to 192.168.59.104 timed out. (connect timeout=60)')
ERROR: (gcloud.preview.app.run) DevAppSever failed with error code [1]
I've confirmed that docker is up and running using boot2docker status which returns running This was working before but after a machine reboot, nothing seems to work. Any ideas?
The main issue is:
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine
/lib/requests/requests/adapters.py", line 384, in send
raise Timeout(e, request=request)
requests.exceptions.Timeout:
(<requests.packages.urllib3.connection.VerifiedHTTPSConnection object
at 0x10631c7d0>, 'Connection to 192.168.59.104 timed out.
(connect timeout=60)')
ERROR: (gcloud.preview.app.run) DevAppSever failed with error code [1]
Which is often the case when you have a proxy, and is discussed in pip issue 1805
It is supposed to be fixed in pip1.6, but just in case, you can try the workaround of alexandrem
/opt/venvs/ironic/lib/python2.6/site-packages/pip/_vendor/requests
/adapters.patch.py /opt/venvs/ironic/lib/python2.6/site-packages
/pip/_vendor/requests/adapters.py
209c209
if True or not proxy in self.proxy_manager:
^^^^
basically I just add a True to the condition on line 209 of the adapter.py to always create a ProxyManager instance, thus skipping the pool manager logic.
The gcloud command enable the ah_host process and also created the docker image of your app and passes it to the Docker daemon, in your case it seems that your docker daemon is not responding to the request. So to make sure,perform "sudo docker -d" to check if the Docker daemon is running on your machine or not.
Also check that, the path of the certificate you set correctly and value of the TLS_VERIFY is TRUE.
Go through the documentation [1] for the installation of Docker on MacOS
[1] https://docs.docker.com/installation/mac/

Python 3.4 and Windows Shared File Paths

I am trying to open a file in a shared network location
open('\\int\GroupData\ITProSup\Operations Support\REMGROUP.txt','+r')
Now this turns into
nemonics>python main.py
eback (most recent call last):
le "main.py", line 41, in <module>
sys.exit(main())
le "main.py", line 36, in main
insert_file_into_db(con_S104838,open('\\int\GroupData\ITProSup\Operations Su
t\REMGROUP.txt','+r'))
NotFoundError: [Errno 2] No such file or directory: '\\int\\GroupData\\ITPro
\Operations Support\\REMGROUP.txt'
I have tried this thread Using Python, how can I access a shared folder on windows network? but it does note seem to work for me. I am running python 3.4.1 and its windows 2012 server.
I have also tried using os.path https://docs.python.org/3.4/library/os.path.html#os.path.normpath with not much luck
C:\mnemonics>python main.py
Traceback (most recent call last):
File "main.py", line 41, in <module>
sys.exit(main())
File "main.py", line 36, in main
insert_file_into_db(con_S104838, open(os.path.normpath('\\int\GroupData\ITPr
oSup\Operations Support\REMGROUP.txt')))
FileNotFoundError: [Errno 2] No such file or directory: '\\int\\GroupData\\ITPro
Sup\\Operations Support\\REMGROUP.txt'
C:\mnemonics>python main.py
Traceback (most recent call last):
File "main.py", line 42, in <module>
sys.exit(main())
File "main.py", line 37, in main
open(os.path.normcase('\\int\GroupData\ITProSup\Operations Support\REMGROUP.
txt'),'+r'))
FileNotFoundError: [Errno 2] No such file or directory: '\\int\\groupdata\\itpro
sup\\operations support\\remgroup.txt'
Any help would be greatly appreciated
Note that \ should be escaped to \\, so \\ should be \\\\
Please try
'\\\\int\\GroupData\\ITProSup\\Operations Support\\REMGROUP.txt'
or
'//int/GroupData/ITProSup/Operations Support/REMGROUP.txt'

Resources