Gcovr cannot find results file - gcov

When I run gcov I get the results file but then when gcovr is run I get an error message
FileNotFoundError: [Errno 2] No such file or directory: 'C:\C~#Ruby26#lib#ruby#gems#2.6.0#gems#ceedling-0.31.1#vendor#cmock#src#cmock.c.gcov'
I have the same set of files running correctly on another machine.

Related

-bash: cd: supbot-tut: No such file or directory

I opened terminal fresh and typed.
$ python3
Then I typed quit to get out of it.
$ quit()
I then typed:
$ pip3 install splinter requests bs4
After I typed:
$ cd supbot-tut
-bash: cd: supbot-tut: No such file or directory
When I typed that I got the error code: -bash: cd: supbot-tut: No such file or directory.
I tried this dozens of times and it won't work. I do not know how to fix this problem and I am a new coder so please send exact code I have to write to fix this problem. Thank you!
Check if you're in the correct directory using pwd and see if that directory contains supbot-tut that you're trying to get into with ls.
Or you can make a directory using mkdir supbot-tut then you will be able to cd into it.
That error occurs when you try to issue the cd command and you pass a directory (a folder) that doesn't exist. Can you type the command ls and see if you see that directory listed. You can easily check with your file explorer too. Create that directory and your issue should go away.

Unable to copy the file to docker host

I am trying to execute the below docker command where I am trying to get the 'Orthanc.json" file to my system folder which is "orthanc".
docker run --rm --entrypoint=cat jodogne/orthanc /etc/orthanc/orthanc.json >
orthanc/orthanc.json
under /etc/orthanc/orthanc.json - It is a directory and not a file - Am not able to use vim editor to read/open the file. - This is a public one. Anyone can access using this link Orthanc link
I get the below error message, Can you please help me understand what is the issue?
-bash: /orthanc/orthanc.json: Is a directory
orthanc.json should be a file but why does it treat it as a directory?
when I use vim orthanc.json, it throws an error message that it's a directory.
What should I be doing to see this as a config file as I have to make changes to it?
You've somehow already got a directory named /orthanc/orthanc.json on your host system. Remove it and try again.
rmdir /orthanc/orthanc.json # if empty
rm -rf /orthanc/orthanc.json # if not empty -- but see what's in there first!

can't delete folder in Docker container

within a running docker container I am trying to erase a folder. However, the OS seems to find that some files are not able to delete it. During the deletion process it says something like can not find file for several files supposed to be within the folder I am trying to delete. Is there a way to repair this?
I tried:
fsck -f /MyFolder
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
fsck.ext2: Is a directory while trying to open /MyFolder
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193
or
e2fsck -b 32768
OTHER error messages:
rm: cannot remove 'MyFolder/webpack.config.js': No such file or directory
rm: cannot remove 'MyFolder/webpack.config.js.bck2': No such file or directory
rm: cannot remove 'MyFolder/webpack.config.js.bck3': No such file or directory
I also noticed a lot of files with size 0 with the names of the files declared as 'cannot remove...'

xpra and sudo / what is the difference between sudo and "being a user"

I'm trying to create a docker image with xpra and chrome in it. As I also need to be able to use this base image to install further software I don't change the user at the end of the Dockerfile.
During a build I use this image for 2 purposes:
- build the final image
- use the base image to run xpra and chrome for build purposes
In the first occasion you need to be root, in the second occasion you need to be the chrome user. I tried to solve this by using sudo: (e.g. sudo -i -u chrome xpra ..., but this causes problems. If I change the base image to be the chrome user (USER CHROME in the Dockerfile), it works fine.
The full error I get:
2018-07-02 11:23:39,828 Error: cannot start the desktop server
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/xpra/scripts/server.py", line 1011, in run_server
app.setup()
File "/usr/lib/python2.7/dist-packages/xpra/server/server_base.py", line 119, in setup
c.setup(self)
File "/usr/lib/python2.7/dist-packages/xpra/server/mixins/audio_server.py", line 55, in setup
self.init_pulseaudio()
File "/usr/lib/python2.7/dist-packages/xpra/server/mixins/audio_server.py", line 117, in init_pulseaudio
os.mkdir(self.pulseaudio_private_dir, 0o700)
OSError: [Errno 2] No such file or directory: '/run/user/1000/xpra/pulse-:0'
2018-07-02 11:23:39,828 [Errno 2] No such file or directory: '/run/user/1000/xpra/pulse-:0'
the /run/user directory doesn't exist in either of the images.
I worked out the issue in the end, and know why I forgot in the first place (I have been able to work on this really fragmented only. The Docker file contained: ENV XDG_RUNTIME_DIR=/tmp
Basicly redirecting the runtime directory, but sudo actually removes that environment variable.

Error using the 'find' command to generate a collection file on opencv

I am facing a problem generating a collection file of the positive images to train the Haar Cascade in OpenCV to detect a car. On every tutorial I found on the internet, it is the same command, however i am unable to execute it.
I am using Command Prompt and Windows Power Shell to execute this command. find ./positive_images/ -iname '.*pgm' > positives.txt the screenshot of the output I am running this command from root of my directory. The positive images are stored in positive_images folder.
OUTPUT:
File not found - '*pgm'
However, the positive_images directory contains 550 files with .pgm extension.
Error File not found - '*pgm'
I am using Command Prompt and Windows Power Shell to execute this command:
find ./positive_images/ -iname '.*pgm' > positives.txt
The above command is using the syntax of a Unix version of find, but you are running it under Windows. PowerShell does not have a built in find command so you are running C:\Windows\System32\find.exe.
Notes:
Unix find is used to search for files.
Windows find is used to search for string in files.
As you are running on Windows you need to use dir instead of find:
dir /b /s positive_images\*.pgm > positives.txt
Further Reading
An A-Z Index of the Windows CMD command line - An excellent reference for all things Windows cmd line related.
dir - Display a list of files and subfolders.
find - Search for a text string in a file & display all the lines where it is found.

Resources