isort will not parse directories anymore, are there variants? - isort

Used isort for a while, but now it starts complaining about the fact that a directory is a directory??
venv/bin/isort --diff --check src tests
WARNING: Unable to parse file src due to [Errno 21] Is a directory: '[...]/src'
WARNING: Unable to parse file tests due to [Errno 21] Is a directory: '[...]/tests'
Are there more than one variants of isort??

Related

How do I solve this issue?

I tried to install a package in command prompt (actin) from python.but always there is an error. I tried to solve this issue but I could not.
The package is (Actin) to calculate the indices in science.
this is an error:
This is what I do:
C:\Users\MAISSA>**\pip install actin
Collecting actin
Using cached actin-1.3.6.tar.gz (52.0 MB)
ERROR: Could not install packages due to an OSError: [Errno 22]
Invalid argument: 'C:\Users\MAISSA\AppData\Local\Temp\pip-install-ysinw5a9\actin_8d5ed7c1aad943cbba7a60ea2545108f\actin/test_files/2010-09-18T23:42:36.178_spec.rdb
The Python OSError: [Errno 22] Invalid argument problem occurs,1.The file path is faulty(The file path does not exist, or the string is inconsistent with the file path) 2.When there are strange characters in front of the path,You should have thought it was because of coding(Whether it's ANSI coding or UTF-8 coding or some other coding reason)

repository #local_jdk which failed to fetch. no such package '#local_jdk//': java.io.IOException: Could not create symlink

I'm trying to Hello World example scala file according to on my windows 10 desktop:
https://github.com/bazelbuild/rules_scala
My WORKSHOP file is as recommended in the rules_scala repo.
My BUILD file is as follows:
load("#io_bazel_rules_scala//scala:scala.bzl", "scala_test", "scala_binary")
scala_binary(
name = "helloworld",
srcs = ["HelloWorld.scala"],
main_class="HelloWorld",
)
I've set my environment variable JAVA_HOME to where my javac.exe file is located. But when I try to build it, I get the following:
EDIT: After enabling developer mode on windows, the first half of the error disappeared, but still get:
PS C:\Users\m80\Documents\GitHub\BotsForGames\HexAgony\src\hexagony> bazel build :helloworld
INFO: Repository local_jdk instantiated at:
/DEFAULT.WORKSPACE.SUFFIX:40:22: in <toplevel>
Repository rule local_java_repository defined at:
C:/users/m80/_bazel_m80/4fgq25dr/external/bazel_tools/tools/jdk/local_java_repository.bzl:66:40: in <toplevel>
ERROR: An error occurred during the fetch of repository 'local_jdk':
Traceback (most recent call last):
File "C:/users/m80/_bazel_m80/4fgq25dr/external/bazel_tools/tools/jdk/local_java_repository.bzl", line 46, column 35, in _local_java_repository_impl
repository_ctx.symlink(file, file.basename)
Error in symlink: java.io.IOException: Could not create symlink from C:/Users/m80/_bazel_m80/4fgq25dr/external/remotejdk11_win/BUILD.bazel to C:/users/m80/_bazel_m80/4fgq25dr/external/local_jdk/BUILD.bazel: C:/users/m80/_bazel_m80/4fgq25dr/external/local_jdk/BUILD.bazel (File exists)
ERROR: Error fetching repository: Traceback (most recent call last):
File "C:/users/m80/_bazel_m80/4fgq25dr/external/bazel_tools/tools/jdk/local_java_repository.bzl", line 46, column 35, in _local_java_repository_impl
repository_ctx.symlink(file, file.basename)
Error in symlink: java.io.IOException: Could not create symlink from C:/Users/m80/_bazel_m80/4fgq25dr/external/remotejdk11_win/BUILD.bazel to C:/users/m80/_bazel_m80/4fgq25dr/external/local_jdk/BUILD.bazel: C:/users/m80/_bazel_m80/4fgq25dr/external/local_jdk/BUILD.bazel (File exists)
ERROR: C:/users/m80/_bazel_m80/4fgq25dr/external/bazel_tools/tools/jdk/BUILD:336:6: #bazel_tools//tools/jdk:jdk depends on #local_jdk//:jdk in repository #local_jdk which failed to fetch. no such package '#local_jdk//': java.io.IOException: Could not create symlink from C:/Users/m80/_bazel_m80/4fgq25dr/external/remotejdk11_win/BUILD.bazel to C:/users/m80/_bazel_m80/4fgq25dr/external/local_jdk/BUILD.bazel: C:/users/m80/_bazel_m80/4fgq25dr/external/local_jdk/BUILD.bazel (File exists)
ERROR: Analysis of target '//hexagony/src/hexagony:helloworld' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.588s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (3 packages loaded, 39 targets configured)
What does this mean? How could I resolve it? I couldn't seem to find many similar problems wrt Scala + Bazel

How Can I Solve "Failed To Source Bitbake" With Xilinx Petalinux SDK

I am running Ubuntu 16.04 with Xilinx Petalinux 2018.03 SDK. After a number of successful compilations I am now facing this error
$ petalinux-build
[INFO] building project
[INFO] sourcing bitbake
ERROR: Failed to source bitbake
ERROR: Failed to build project
How can I solved this issue?
Another reason to get the errors "ERROR: Failed to source bitbake" as well as "ERROR: Failed to build project" is a possible upgrade of Python on the build machine. The Petalinux SDK requires python v2 (>= 2.7.3) for the 2018.3 edition.
You can check under [YOUR_PROJECT]/build/build.log and you might see a log similar to this one below:
[INFO] building project
[INFO] sourcing bitbake
SDK environment now set up; additionally you may now run devtool to perform development tasks.
Run devtool --help for further details.
OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3.
Please set up python v2 as your default 'python' interpreter.
ERROR: Failed to source bitbake
ERROR: Failed to build project
To remedy this issue remove the symbolic link under /usr/bin and make sure to create a new one that is pointing to Python 2.7:
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python2.7 /usr/bin/python
First you need to investigate the error a little further, do this:
source /opt/pkg/petalinux/2018.3/settings.sh
It will return something similar to this below:
PetaLinux environment set to '/opt/pkg/petalinux/2018.3'
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
Source the environment setup:
source /opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/environment-setup-aarch64-xilinx-linux
followed by:
devtool --help
In my case I can see more about the actual error:
NOTE: Starting bitbake server...
ERROR: Unable to start bitbake server
ERROR: Last 10 lines of server log for this session (/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/bitbake-cookerdaemon.log):
Traceback (most recent call last):
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/daemonize.py", line 77, in createDaemon
function()
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/server/process.py", line 433, in _startServer
self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/cooker.py", line 178, in __init__
self.configwatcher = pyinotify.WatchManager()
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/pyinotify.py", line 1764, in __init__
raise OSError(err % self._inotify_wrapper.str_errno())
OSError: Cannot initialize new instance of inotify, Errno=Too many open files (EMFILE)
ERROR: Unable to start bitbake server
ERROR: Last 10 lines of server log for this session (/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/bitbake-cookerdaemon.log):
Traceback (most recent call last):
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/daemonize.py", line 77, in createDaemon
function()
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/server/process.py", line 433, in _startServer
self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/cooker.py", line 178, in __init__
self.configwatcher = pyinotify.WatchManager()
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/pyinotify.py", line 1764, in __init__
raise OSError(err % self._inotify_wrapper.str_errno())
OSError: Cannot initialize new instance of inotify, **Errno=Too many open files (EMFILE)**
This is pointing to the /proc/sys/fs/inotify/max_user_instances that need to be increased. In my case I went from 128 to 256 by doing this:
sudo su
echo 256 > /proc/sys/fs/inotify/max_user_instances
You need to become root with "su" and change the mac_user_instances.

Creating virtualenv inside veracypt error

I'm setting up a project inside veracrypt and it's throwing this error when I try to setup the environment.
admin#kali:/media/veracrypt1$ virtualenv --python=python3 venv
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /media/veracrypt1/venv/bin/python3
Also creating executable in /media/veracrypt1/venv/bin/python
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/dist-packages/virtualenv.py", line 870, in main
symlink=options.symlink,
File "/usr/local/lib/python3.7/dist-packages/virtualenv.py", line 1162, in create_environment
install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages=site_packages, clear=clear, symlink=symlink)
File "/usr/local/lib/python3.7/dist-packages/virtualenv.py", line 1672, in install_python
os.symlink(py_executable_base, full_pth)
PermissionError: [Errno 1] Operation not permitted: 'python3' -> '/media/veracrypt1/venv/bin/python'
I've tried to look for the source of the issue and it seems it's related to how it's a virtualdrive with limited rights
admin#kali:/media/veracrypt1$ ln -s testfile
ln: failed to create symbolic link './testfile': Operation not permitted
Looks like you are running this in an environment with limited permissions.
Some report this behavior when running on Linux,
but in a folder that is mounted to a "FAT32" partition -
see Chris Lope's blog-post:
permissionerror: [errno 1] operation not permitted
I have experienced this behavior while running in an Ubuntu VM
in a folder that was mounted to the host-OS (Windows-NTFS) as type 'vboxsf'.
Solved it by moving to work in a partition that is native Unix.

sn_complie.sh error: Failed to create Specman's temporary directory `/local/temp/specman'

I'm trying to complie an e file using sn_compile.sh script. I get an error:
Failed to create Specman's temporary directory
`/local/temp/specman'
even though I defined explicitly temp files directory. The command I run:
sn_complile.sh efile.e -t temp/
How can I solve the error?
Thank you for your help