I have a problem to copy file from Google cloud storage to my local machine. Below is the command that I run:
gsutil -m cp "gs://database/Cloud_SQL_Export_2017-09-19 (11:41:09)" .
The error that I get is as below:
Copying gs://database/Cloud_SQL_Export_2017-09-19 (11:41:09)...
==> NOTE: You are downloading one or more large file(s), which would
run significantly faster if you enabled sliced object downloads. This
feature is enabled by default but requires that compiled crcmod be
installed (see "gsutil help crcmod").
[Errno 22] invalid mode ('ab') or filename: u'.\Cloud_SQL_Export_2017-09-19 (11:41:09)_.gstmp'
CommandException: 1 file/object could not be transferred.
Hope that someone can help me :)
Seems like it required a third party download:
https://pypi.python.org/pypi/crcmod
But it might also need some escapes around the parenthesis and other symbols:
"gs://database/Cloud_SQL_Export_2017-09-19\ \(11\:41\:09\)" .
Related
Im sure this this just a lack of knowledge on my end but im having a hard time understand how to install aws-nuke following there documentation. I have downloaded the latest release but install instructions are not so clear for me https://github.com/rebuy-de/aws-nuke#:~:text=Use%20Released%20Binaries,Run%20%24%20aws%2Dnuke%2Dv2.16.0%2Dlinux%2Damd64
Any suggestions would be appreciated.
On a Mac you can run aws-nuke using the following steps:
Open a terminal (Command + Space and write terminal)
Grab the latest version of the aws-nuke. Currently the latest version is 2.17.0 but obviously this will change in the future. In order to download aws-nuke, we can run the following command:
For M1 Mac:
wget https://github.com/rebuy-de/aws-nuke/releases/download/v2.17.0/aws-nuke-v2.17.0-darwin-arm64.tar.gz
For intel Mac:
wget https://github.com/rebuy-de/aws-nuke/releases/download/v2.17.0/aws-nuke-v2.17.0-darwin-amd64.tar.gz
Extract the package using the following command (note: use amd64 instead of arm64 if you are on an intel Mac):
tar -xvf aws-nuke-v2.17.0-darwin-arm64.tar.gz
Create a config.yml file with the following content and place it nearby the extracted executable:
regions:
- global
account-blocklist:
- "999999999999" # leave it as it is, since the current version wont work if you don't provide a blocklist
accounts:
"000000000000": {} # fill in your own AWS account number
Run the following command:
./aws-nuke-v2.17.0-darwin-arm64 -c config.yml
This should list the resources which might be deleted. If you are ok with the list, append --no-dry-run to the previous command.
I am using gsutil to move files, but this generates an exception if none of the files are moved.
This is the command I run:
gsutil -m mv gs://{url}/20200116* gs://{destional url}/data/rtbiq_data/
The exception I see:
CommandException: No URLs matched: gs://{url}/20200116*
CommandException: 1 file/object could not be transferred.
I want it to just go through without any exception being thrown even if none of the files are moved. How can I do that?
There isn't an official gsutil mv option to do that, but an one approach is to simply redirect the output of the command to /dev/null, essentially supressing stderr:
gsutil -m mv gs://{url}/20200116* gs://{destional url}/data/rtbiq_data/ 2> /dev/null
I just update my google cloud SDK on windows 10 (gcloud components update).
After the update the gcloud command stop working.
All I get is (for example : gcloud -h):
PATH\lib\gcloud.py" -h" was unexpected at this time.
I try to re-install but it didn't help:(
As noted in the other answers, this is a bug with the 274.0.0 version of gcloud. Another report of this issue actually identifies where the bug is and offers this fix:
If you are stuck and need an immediate solution, here's a workaround that will move you forward, but you should reinstall the Cloud SDK from scratch when a fix is ready.
Open C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk-bin\gcloud.cmd in your editor
Near line 170, change ) ELSE ( to be just )
Remove the ) on the last line in the file.
That should get you working in the short term (albeit with an extraneous error message every time you run a command). After getting it working you can revert to version 273.0.0 (so that you stop getting the error message and aren't using a modified version) using:
gcloud components update --version=273.0.0
This is being tracked in the public bug https://issuetracker.google.com/issues/146458519
We have a patch for two files that are causing these problems. These apply in two cases (both on Windows):
1. A new install fails, or
2. You are unable to run gcloud after performing a components update.
For case # 1, please download the attached file install.bat, and copy it to the location where you have attempted to install gcloud, e.g. C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk. Then run it, e.g.
cd C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk
.\install.bat
For both cases #1 and #2, download the attached file gcloud.cmd, and copy it to the bin directory under your gcloud installation, e.g.
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin. When prompted to replace the previous copy, type Yes. This should allow you to run gcloud without being prompted to set CLOUDSDK_PYTHON.
The files are attached in the public bug tracker.
This is a known issue that is being tracked here
After hours of trying to fix it! I found how :)
uninstall google SDK
https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.zip
https://cloud.google.com/sdk/docs/downloads-interactive#interactive_installation
This fix the bug.
After that I had new bug in pyCharm GAE:
ImportError: No module named _subprocess
I fix this with the solution here:
Error importing built-in module "_subprocess" using Google Cloud Platform's Local Development Server
Hope this helps and saves a lot of trouble for you guys :)
I solved this problem. I got the same error message.
My Env: gcloud v274.0.0, Windows 7
First, I re-installed Google SDK, and changed my path to \Google\CloudSDK\.
Second, I got this message
"\Google\CloudSDK\google-cloud-sdk\bin..\lib\gcloud.py" init" was unexpected at this time."
So I tried to use cd command to specific directory where gcloud.py is exist.
Finally, I found the path: \Google\CloudSDK\google-cloud-sdk\lib, and it works.
Hope it can help you, too.
The problem, or rather bug within the installer, is that you are using a directory that contains spaces within it. At some point of the script the space causes the command to be split up incorrectly, causing the error.
I had the same message and fixed it by re-installing the Google Cloud SDK in a directory without spaces (c:\Google\CloudSDK)
I installed ColdFusion 9.0.0 today and I'm trying to upgrade to 9.0.1.
Linux 64bit environment.
I don't have root access.
/tmp doesn't seem to have enough room to install 9.0.1
I found the following errors in /opt/coldfusion9/Adobe_ColdFusion_9.0.1_InstallLog.log
Install File: /tmp/515453.tmp/cf-multi-startup
Status: ERROR
Additional Notes: ERROR - ZeroGlq: No space left on device
Install File: /tmp/515453.tmp/cf-init.sh
Status: ERROR
Additional Notes: ERROR - ZeroGlq: No space left on device
I tried -D IATEMPDIR=/opt/temp, but installer says it's trying to use /home/coldfusion due to lack of space in /tmp. It tries to use /tmp anyway.
Any ideas?
Here's my final script that worked. I had to fill /tmp and /home to 100% to get a decent error response out of the bin file. I'm sure my Linux admins were very pleased.
cd /opt/coldfusion9/bin
IATEMPDIR=/home/coldfusion
export IATEMPDIR
LAX_DEBUG=1
export LAX_DEBUG
./ColdFusion_update_901_WWEJ_linux64.bin
I am having a problem updating Cocos2d to the current version. I deleted the old template files and installed the new version using the command
./install-templates.sh -u -f
but I always get the following in the terminal:
Installing Xcode 4 Box2d iOS template
-------------------------------------------------
mkdir: /Users/jubilate/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
...copying Box2d files
rsync: mkdir "/Users/jubilate/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_box2d.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
rsync: mkdir "/Users/jubilate/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_box2d.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
done!
Installing Xcode 4 CCNode file templates...
----------------------------------------------------
...creating destination directory: /Users/jubilate/Library/Developer/Xcode/Templates/File Templates/cocos2d v2.x/
mkdir: /Users/jubilate/Library/Developer/Xcode/Templates/File Templates/cocos2d v2.x: Permission denied
mv: rename /Users/jubilate/Library/Developer/Xcode/Templates/cocos2d v2.x//CCNode class.xctemplate to /Users/jubilate/Library/Developer/Xcode/Templates/File Templates/cocos2d v2.x/: No such file or directory
done!
Could someone please help me out. Thanks in Advance
I had the same issue as well. It turned out to due to my previous cocos2d (v1) was installed as "root".
If you do a
ls -ltr /Users/jubilate/Library/Developer/Xcode/
you will see that permission of "Templates" is "root staff"
you need to "sudo -s", enter your root user password, then
cd "/Users/jubilate/Library/Developer/Xcode/"
chown jubilate:staff Templates
this will change the permission of "Templates" to "jubilate staff", which you can then do the installation.
Give it a go and see how it goes.
Cheers
You probably installed the previous templates with the sudo command. You will have to manually delete the files in Finder.
Delete these folders beginning with "cocos2d":
~/Library/Developer/Xcode/Templates/cocos2d*
~/Library/Developer/Xcode/Templates/File Templates/cocos2d*