I am developing ios and android applications using native script-angular.When I created a new native script angular application and build that application it caused the error like
File "./build-step-metadata-generator.py", line 40, in <module>
header_search_paths_parsed = map_and_list((lambda s: "-I" + s), shlex.split(header_search_paths))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shlex.py", line 279, in split
return list(lex)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shlex.py", line 269, in next
token = self.get_token()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shlex.py", line 96, in get_token
raw = self.read_token()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shlex.py", line 172, in read_token
raise ValueError, "No closing quotation"
ValueError: No closing quotation
How to fix the issue?
It seems like the apostrophe in the path breaks shlex.split. As a workaround I suggest that you rename the directory of your project to not have an '
Related
I was hoping someone could help me understand why JupyterLab fails to spin up a kernel on my system.
Background
I'm working on macOS High Sierra. I used to have Anaconda installed via the Mac OS installer in the default location in my home folder ($HOME/anaconda). Based on this thread I uninstalled Anaconda.
I reinstalled Anaconda from the Homebrew Cask (placing export PATH=/usr/local/anaconda3/bin:"$PATH" in my .bashrc).
The Problem
Now when I
run jupyter-lab,
create a new notebook, and
select a Python 3 kernel,
the process fails with the following output:
Traceback (most recent call last):
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/web.py", line 1543, in _execute
result = yield result
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
value = future.result()
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "/usr/local/anaconda3/lib/python3.6/site-packages/notebook/services/sessions/handlers.py", line 73, in post
type=mtype))
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
value = future.result()
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "/usr/local/anaconda3/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 79, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
value = future.result()
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "/usr/local/anaconda3/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 92, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
value = future.result()
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 315, in wrapper
yielded = next(result)
File "/usr/local/anaconda3/lib/python3.6/site-packages/notebook/services/kernels/kernelmanager.py", line 148, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "/usr/local/anaconda3/lib/python3.6/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "/usr/local/anaconda3/lib/python3.6/site-packages/jupyter_client/manager.py", line 259, in start_kernel
**kw)
File "/usr/local/anaconda3/lib/python3.6/site-packages/jupyter_client/manager.py", line 204, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/usr/local/anaconda3/lib/python3.6/site-packages/jupyter_client/launcher.py", line 128, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/usr/local/anaconda3/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/local/anaconda3/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '~/anaconda/bin/python': '~/anaconda/bin/python'
I'd already removed all references to $HOME/anaconda (my old install location) from my environment (.bashrc, .bash_profile), so I can't figure out where the reference is being picked up.
Any suggestions would be greatly appreciated.
This question was answered in this GitHub thread for the Jupyter project. The basic solution:
run jupyter kernelspec list to see if it points to the correct Python install
if not, remove the folder ~/Library/Jupyter
re-run jupyter kernelspec list
This should rebuild the directory and give output like
Available kernels:
python3 /usr/local/anaconda3/share/jupyter/kernels/python3
which is the proper location for the Homebrew install of Anaconda.
I use a lot of special characters from Hun language, and there were no problems previously. Now they all give errors when running the whole script (F9). It still runs perfect when running locally (select + F5).
FĂșĂș='bar'
Traceback:
C:\Users\my name\.ipython\cython\_cython_magic_21a3824690cdb52a9fe6a3fa1c63ee73.pyx:1:1: Unrecognized character
Traceback (most recent call last):
File "<ipython-input-6-dcfab52d0ff4>", line 1, in <module>
runfile('E:/Anyagok/Programozas/Python/projekts/elo/mindennap/untitled0.pyx', wdir='E:/Anyagok/Programozas/Python/projekts/elo/mindennap')
File "E:\Download\PROGIK\ANACONDA\lib\site-packages\spyder\utils\site\sitecustomize.py", line 703, in runfile
ipython_shell.run_cell_magic('cython', '', f.read())
File "E:\Download\PROGIK\ANACONDA\lib\site-packages\IPython\core\interactiveshell.py", line 2131, in run_cell_magic
result = fn(magic_arg_s, cell)
File "<decorator-gen-130>", line 2, in cython
File "E:\Download\PROGIK\ANACONDA\lib\site-packages\IPython\core\magic.py", line 187, in <lambda>
call = lambda f, *a, **k: f(*a, **k)
File "E:\Download\PROGIK\ANACONDA\lib\site-packages\Cython\Build\IpythonMagic.py", line 321, in cython
assert len(extensions) == 1
TypeError: object of type 'NoneType' has no len()
If I change to e.g.
Fuu='bar'
it works great. Why the sudden change of heart?
EDIT:
Have been messing around with FFMPEG and LIBAV yesterday, because wanted to download and convert Youtube videos to mp3. But I'm pretty sure I ran scripts with these characters succesfully after it.
I try to run behave tests in parallel. For this I use behave-parallel lib and demo project https://github.com/vishalm/behave_parallel_demo. But OS is Windows 10. After steps from Read_me file. I am getting next Tracebacks
(behave_parallel_demo-master) D:\Python_projects\behave_parallel_demo-master>behave --processes 5 --parallel-element feature
INFO: 0 scenario(s) and 3 feature(s) queued for consideration by 5 workers. Some may be skipped if the -t option was given...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\python27\Lib\multiprocessing\forking.py", line 381, in main
self = load(from_parent)
File "c:\python27\Lib\pickle.py", line 1384, in load
return Unpickler(file).load()
File "c:\python27\Lib\pickle.py", line 864, in load
dispatch[key](self)
File "c:\python27\Lib\pickle.py", line 1089, in load_newobj
obj = cls.__new__(cls, *args)
TypeError: __new__() takes exactly 3 arguments (2 given)
Traceback (most recent call last):
File "c:\python27\Lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\Lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Users\Andriy_Petrenko\Envs\behave_parallel_demo-master\Scripts\behave.exe\__main__.py", line 9, in <module>
File "c:\users\andriy_petrenko\envs\behave_parallel_demo-master\lib\site-packages\behave\__main__.py", line 111, in main
failed = runner.run()
File "c:\users\andriy_petrenko\envs\behave_parallel_demo-master\lib\site-packages\behave\runner.py", line 561, in run
return self.run_with_paths()
File "c:\users\andriy_petrenko\envs\behave_parallel_demo-master\lib\site-packages\behave\runner.py", line 583, in run_with_paths
return self.run_multiproc()
File "c:\users\andriy_petrenko\envs\behave_parallel_demo-master\lib\site-packages\behave\runner.py", line 690, in run_multiproc
p.start()
File "c:\python27\Lib\multiprocessing\process.py", line 130, in start
self._popen = Popen(self)
File "c:\python27\Lib\multiprocessing\forking.py", line 280, in __init__
to_child.close()
IOError: [Errno 22] Invalid argument
What I do wrong or is this OS problem? It looks like that 5 workers were up but 1st problem is that TypeError: __new__() takes exactly 3 arguments (2 given) and 2nd IOError: [Errno 22] Invalid argument
I am not familiar with Behave so not sure whether you are passing the command line correctly but this error means that one of the method is expecting more arguments than you have provided. In this case, it's during creation of cls instance:
File "c:\python27\Lib\pickle.py", line 1089, in load_newobj
obj = cls.__new__(cls, *args)
This looks like some internal class instance so you do not control it directly so make sure you pass enough and correct arguments at command line.
Update your Behave package. it will work.
We have been trying for a long time to implement parallel test executions with behave (which is an amazing framework). Finally, we created our own wrapper on top of Behave, called BehaveX, that not only allow us to execute tests in parallel, but also comes with great reports and some additional features:
https://github.com/hrcorval/behavex
As BehaveX is implemented over the Behave framework, with this wrapper you should be able to replace the "behave" executable by "behavex", and run the tests in parallel using the following commands:
behavex -t #TAG --parallel-processes 4 --parallel-scheme scenario
behavex -t #TAG --parallel-processes 3 --parallel-scheme feature
I am trying to get selenium webdriver to work, but even with a simple python script like this:
from selenium import webdriver
driver = webdriver.Firefox()
driver.get('http://www.google.com')
driver.quit()
I am getting:
Traceback (most recent call last):
File "test.py", line 14, in <module>
driver.get('http://www.google.com')
File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 207, in get
self.execute(Command.GET, {'url': url})
File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 193, in execute
response = self.command_executor.execute(driver_command, params)
File "C:\Python34\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 358, in execute
return self._request(command_info[0], url, body=data)
File "C:\Python34\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 389, in _request
resp = self._conn.getresponse()
File "C:\Python34\lib\http\client.py", line 1171, in getresponse
response.begin()
File "C:\Python34\lib\http\client.py", line 351, in begin
version, status, reason = self._read_status()
File "C:\Python34\lib\http\client.py", line 321, in _read_status
raise BadStatusLine(line)
http.client.BadStatusLine: ''
This has been going on with all the scripts I am trying. Firefox will open and attempt to open the website and then close and then another Firefox instance opens up but is a completely new blank page. I am currently on the latest version of everything. Firefox 31.7.0 ESR (up to date according to Firefox), Selenium 2.46.0, and Python 3.4. Any help would be appreciated!
Thanks
Use Firefox stable releases. Version 38 should work.
I am using addon-sdk for developing an extension.When I ran my code using cfx run on Firefox 32.0 and checked the browser console it shows following:
"DEPRECATED: The widget module is deprecated. Please consider using the sdk/ui module instead.
Traceback (most recent call last):
File "resource://gre/modules/commonjs/sdk/addon/runner.js", line 114, in startup/<
run(options);
File "resource://gre/modules/commonjs/sdk/addon/runner.js", line 170, in run
let program = main(options.loader, options.main);
File "resource://gre/modules/commonjs/toolkit/loader.js", line 645, in main
return loader.load(loader, module).exports;
File "resource://gre/modules/commonjs/sdk/loader/cuddlefish.js", line 129, in CuddlefishLoader/options<.load
result = load(loader, module);
File "resource://gre/modules/commonjs/toolkit/loader.js", line 299, in load
evaluate(sandbox, module.uri);
File "resource://gre/modules/commonjs/toolkit/loader.js", line 262, in evaluate
: loadSubScript(uri, sandbox, encoding);
File "resource://skype_ff_extension-at-jetpack/skype_ff_extension/lib/main.js", line 14, in null
var widgets = require("sdk/widget");
File "resource://gre/modules/commonjs/toolkit/loader.js", line 619, in require
freeze(load(loader, module));
File "resource://gre/modules/commonjs/sdk/loader/cuddlefish.js", line 129, in CuddlefishLoader/options<.load
result = load(loader, module);
File "resource://gre/modules/commonjs/toolkit/loader.js", line 299, in load
evaluate(sandbox, module.uri);
File "resource://gre/modules/commonjs/toolkit/loader.js", line 262, in evaluate
: loadSubScript(uri, sandbox, encoding);
File "resource://gre/modules/commonjs/sdk/widget.js", line 60, in null
"The widget module is deprecated. " +
File "resource://gre/modules/commonjs/sdk/util/deprecate.js", line 18, in deprecateUsage
let stack = get().slice(2);"
How to debug this error?
PS:To anyone who see this error first check if its your add-on or any other add-on which is throwing this error.
open about:support
then search there Skype Click to Call plugin ID
and remove file with name
{82AF8DCA-6DE9-405D-BD5E-43525BDAD38A}.xpi
from your
mozilla_installation_path\browser\extensions\
(c:\Program Files (x86)\Mozilla Firefox\browser\extensions\)
Solution is to edit code in the add-on. Take out that require('widget') and move to require('sdk/ui'): https://blog.mozilla.org/addons/2014/03/13/new-add-on-sdk-australis-ui-features-in-firefox-29/
Once you change to sdk/ui, you have to change how the add-on was making widgets to use the sdk/ui. Lean about that by:
See and follow the links in the note "Deprecated" seen on the documentation page of widget module: https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/widget
Try removing extensions.sdk.console.logLevel; all from about:config and replacing it with extensions.YOUR_EXTENSION_ID.sdk.console.logLevel; all
This should return the log level to the default of error, meaning you won't see any other extensions' console.log output.
Edit
The above still shows other extensions' error messages, if you want to remove them, do the following.
Check out this post for an explanation. Essentially, you add a string to about:config (by right-clicking) called extensions.sdk.console.logLevel and set it to off, then add the string extensions.YOUR_EXTENSION_ID.sdk.console.logLevel and set it to all.