I am having issue trying to 'jupyter labextension build'. Any guidance would be greatly appreciated please.
here is the jupyter labextension list
JupyterLab v3.0.14
C:\Users\xxxx.conda\envs\jz\share\jupyter\labextensions
#jupyter-widgets/jupyterlab-manager v3.0.0 enabled ok (python, jupyterlab_widgets)
#voila-dashboards/jupyterlab-preview v2.0.2 enabled ok (python, voila)
Other labextensions (built into JupyterLab)
app dir: C:\Users\xxxx.conda\envs\jz\share\jupyter\lab
jupyterlab-plotly v4.14.3 enabled ok
plotlywidget v4.14.3 enabled ok
as you can see, everything pretty much the most up to date and in 'sync'.
the log looks this:
Building extension in C:\Users\xxxxx
Traceback (most recent call last):
File "C:\Users\xxxxx.conda\envs\jz\lib\site-packages\jupyterlab\debuglog.py", line 47, in debug_logging
yield
File "C:\Users\xxxxx.conda\envs\jz\lib\site-packages\jupyterlab\labextensions.py", line 128, in start
ans = self.run_task()
File "C:\Users\xxxxx.conda\envs\jz\lib\site-packages\jupyterlab\labextensions.py", line 227, in run_task
build_labextension(self.extra_args[0], logger=self.log, development=self.development, static_url=self.static_url or None, source_map = self.source_map,
File "C:\Users\xxxxx.conda\envs\jz\lib\site-packages\jupyterlab\federated_labextensions.py", line 168, in build_labextension
builder = _ensure_builder(ext_path, core_path)
File "C:\Users\xxxxx.conda\envs\jz\lib\site-packages\jupyterlab\federated_labextensions.py", line 226, in _ensure_builder
with open(osp.join(ext_path, 'package.json')) as fid:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\xxxxx\package.json'
Exiting application: lab
Related
Traceback (most recent call last):
File "<string>", line 34, in <module>
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\mp.py", line 105, in CreateWebLayerSDDraft
return _convertArcObjectToPythonObject(arcgisscripting._mapping.CreateWebLayerSDDraft(*_gp_fixargs([map_or_layers, out_sddraft, service_name, server_type, service_type, folder_name, overwrite_existing_service, copy_data_to_server, enable_editing, allow_exporting, enable_sync, summary, tags, description, credits, use_limitations], True)))
ValueError: Staging path is invalid or inaccessible: C:\Users\hagerty_finn\Documents\ArcGIS\Projects\TrafficFatalityCount\temp.txt
Line 34:
arcpy.mp.CreateWebLayerSDDraft(mp, sddraft, sd_fs_name, 'MY_HOSTED_SERVICES', 'FEATURE_ACCESS')
I tried changing the file path to another user and updating the password. The problem persists. I am running this script in ArcGIS Pro Python window on a GIS local server.
I have a python script that runs on python3.4 and uses the package keyboard to allow for keybinds;
keyboard.add_hotkey("enter", self.listener.stop, suppress=True)
keyboard.add_hotkey("shift+enter", self.listener.finish, suppress=True)
When I run this on Windows, it works perfectly listening to both hotkeys, also when run on linux (CentOS) it works.
At work I've gotten a Ubuntu environment on my windows via the windows 10 feature and app store. However this environment has a problem with this keyboard hotkey.
/usr/local/lib/python3.6/dist-packages/keyboard-0.13.2-py3.6.egg/keyboard/_nixkeyboard.py:110: UserWarning: Failed to create a device file using `uinput` module. Sending of events may be limited or unavailable depending on plugged-in devices.
device = aggregate_devices('kbd')
Traceback (most recent call last):
File "main.py", line 32, in <module>
], 'test')
File "/mnt/.../can_controller.py", line 28, in __init__
self.__initialise_key_handler()
File "/mnt/.../can_controller.py", line 95, in __initialise_key_handler
keyboard.add_hotkey("enter", self.listener.stop, suppress=True)
File "/usr/local/lib/python3.6/dist-packages/keyboard-0.13.2-py3.6.egg/keyboard/__init__.py", line 637, in add_hotkey
_listener.start_if_necessary()
File "/usr/local/lib/python3.6/dist-packages/keyboard-0.13.2-py3.6.egg/keyboard/_generic.py", line 35, in start_if_necessary
self.init()
File "/usr/local/lib/python3.6/dist-packages/keyboard-0.13.2-py3.6.egg/keyboard/__init__.py", line 194, in init
_os_keyboard.init()
File "/usr/local/lib/python3.6/dist-packages/keyboard-0.13.2-py3.6.egg/keyboard/_nixkeyboard.py", line 113, in init
build_device()
File "/usr/local/lib/python3.6/dist-packages/keyboard-0.13.2-py3.6.egg/keyboard/_nixkeyboard.py", line 110, in build_device
device = aggregate_devices('kbd')
File "/usr/local/lib/python3.6/dist-packages/keyboard-0.13.2-py3.6.egg/keyboard/_nixcommon.py", line 168, in aggregate_devices
assert fake_device
AssertionError
If anybody knows how to fix this or has a good work-around. Please let me know.
I have uploaded the unzipped python 3 package larch locally on our server from the school. But I can not either locally installed it by using pip, or know how to use the codes from the package folder. Under the main folder larch-master, there is a bin folder and a file larch within the bin.
All the other related codes are saved at larch-master/py. Is there any way for me to use the local packages on this Linux server?
After cd ~/larch-master
I did python setup.py install
and I got the following error
checking filemod time on sqlite/sqlite3.c vs build/lib.linux-x86_64-3.6/larch/larchsqlite.so
checking filemod time on sqlite/haversine.c vs build/lib.linux-x86_64-3.6/larch/larchsqlite.so
checking filemod time on sqlite/bonus.c vs build/lib.linux-x86_64-3.6/larch/larchsqlite.so
yes need to update
temp_folder(basepath)= build/temp.linux-x86_64-3.6
shlib_folder(basepath)= build/lib.linux-x86_64-3.6/larch
In file included from sqlite/bonus.c:134:0:
sqlite/bonus.c:727:18: error: expected ‘)’ before ‘c’
int isblank(char c){
^
sqlite/bonus.c:727:5: error: expected expression before ‘)’ token
int isblank(char c){
^
Traceback (most recent call last):
`File"/gpfs/software/Anaconda3/lib/python3.6/distutils/unixccompiler.py", line 118, in _compile
extra_postargs)
File "/gpfs/software/Anaconda3/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/gpfs/software/Anaconda3/lib/python3.6/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/gpfs/software/Anaconda3/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'cc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "setup.py", line 186, in
build_sqlite(buildbase)
File "~/larch-master/setup_sqlite.py", line 367, in build_sqlite
objects = c.compile(source, extra_preargs=extra_preargs, debug=DEBUG, macros=local_macros, output_dir=temp_folder(basepath))
File "/gpfs/software/Anaconda3/lib/python3.6/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/gpfs/software/Anaconda3/lib/python3.6/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'cc' failed with exit status 1`
I am not a professional developer... trying to save chromedriver to PATH variable so i can use selenium with python.
following this page for instructions on this page
https://medium.com/#himanshuagarwal1395/setting-up-environment-variables-in-macos-sierra-f5978369b255
I open bash_profile with nano .bash_profile
I made a directory user/mysusername/selenium/
then saved my file chromedriver in this directory with the python script i and using selenium with.
I have tried to save my path to the chromedriver.exe file as such
export PATH="/User/baldoa/selenium/ChromeDriver.exe:$PATH"
I follow the steps to save appropriately according to this page. I am not sure
i still get the following error :
a8206602016e:selenium baldoa$ python destruction.py
Traceback (most recent call last):
File "/Users/baldoa/.pyenv/versions/3.6.5/lib/python3.6/site-packages/selenium
/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/Users/baldoa/.pyenv/versions/3.6.5/lib/python3.6/subprocess.py", line
709, in __init__
restore_signals, start_new_session)
File "/Users/baldoa/.pyenv/versions/3.6.5/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: 'C:/users/baldoa
/selenium/chromedriver.exe': 'C:/users/baldoa/selenium/chromedriver.exe'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "destruction.py", line 7, in <module>
browser = webdriver.Chrome("""C:/users/baldoa/selenium/chromedriver.exe""")
File "/Users/baldoa/.pyenv/versions/3.6.5/lib/python3.6/site-packages/selenium
/webdriver/chrome/webdriver.py", line 68, in __init__
self.service.start()
File "/Users/baldoa/.pyenv/versions/3.6.5/lib/python3.6/site-packages/selenium
/webdriver/common/service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe'
executable needs to be in PATH. Please see https://sites.google.com
/a/chromium.org/chromedriver/home
my script
from selenium import webdriver
o = webdriver.Firefox()
and i get this problem
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/webdriver.py", line 142, in __init__
self.service.start()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 74, in start
stdout=self.log_file, stderr=self.log_file)
File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1283, in _execute_child
raise child_exception_type(errno_num, err_msg)
OSError: [Errno 8] Exec format error
i searched on it and i found this
OSError: [Errno 8] Exec format error selenium
i get chromedriver and put it in '/usr/local/bin/'
like supposed,
it doesn't help
and also did the same thing with geckodriver
Trouble setting up selenium with python3(linux)
nothing work same error
and i try this shot
#!usr/bin/python
#!/usr/bin/env bash
from selenium import webdriver
web = webdriver.Firefox(executable_path="/usr/local/bin/chromedriver")
it give me that error :
Traceback (most recent call last):
File "/root/Desktop/test.py", line 5, in <module>
web = webdriver.Firefox(executable_path="/usr/local/bin/chromedriver")
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/webdriver.py", line 142, in __init__
self.service.start()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 96, in start
self.assert_process_still_running()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 109, in assert_process_still_running
% (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service /usr/local/bin/chromedriver unexpectedly exited. Status code was: 1
Note :
operation system is kali linux
SMP Debian 4.9.18-1kali1 version,
firefox and selenium is up to date
driver should be updated one & did u try webdriver.Firefox(driver_path) ?
Uninstall instance of webdriver dependency and install the correct one which corresponds to your OS and browser version.Also when you give path of chrome ,it should end with chrome.exe and not chrome.