tensorflow_datasets.load() downloads but cannot extract certain datasets - tensorflow-datasets

Calling tensorflow_datasets.load('cycle_gan/apple2orange') works fine
but tensorflow_datasets.load('cycle_gan/vangogh2photo') gives me an error.
I've tried this on my desktop and laptop and both gave the same error message.
Here's the code I ran and the error message I got:
import tensorflow_datasets as tfds
dataset = tfds.load('cycle_gan/vangogh2photo',
data_dir='data', batch_size=1, download=True, in_memory=False)
InvalidArgumentError: Failed to create a NewWriteableFile: data\downloads\extracted\ZIP.peop.eecs.berk.edu_taes_park_Cycl_data_vanNiw0c-cL4JRL2gjUnWYOr9woVN9V1peDW4GG0decqv8.zip.incomplete_bf327518b23f41ee9a3a469cc0b541ba\vangogh2photo\testB\2014-12-10 12:08:40.jpg : The filename, directory name, or volume label syntax is incorrect.
; Unknown error
then it says
During handling of the above exception, another exception occurred:
(traceback)
ExtractError: Error while extracting data\downloads\peop.eecs.berk.edu_taes_park_Cycl_data_vanNiw0c-cL4JRL2gjUnWYOr9woVN9V1peDW4GG0decqv8.zip to data\downloads\extracted\ZIP.peop.eecs.berk.edu_taes_park_Cycl_data_vanNiw0c-cL4JRL2gjUnWYOr9woVN9V1peDW4GG0decqv8.zip : Failed to create a NewWriteableFile: data\downloads\extracted\ZIP.peop.eecs.berk.edu_taes_park_Cycl_data_vanNiw0c-cL4JRL2gjUnWYOr9woVN9V1peDW4GG0decqv8.zip.incomplete_bf327518b23f41ee9a3a469cc0b541ba\vangogh2photo\testB\2014-12-10 12:08:40.jpg : The filename, directory name, or volume label syntax is incorrect.
; Unknown error
How do I fix this?

Which OS are you using?
There is an issue with some datasets on Windows when composing the URLs to fetch the files or the URLs where to save them locally.
For the Oxford Pets III dataset, the link below provides the fix:
https://github.com/tensorflow/tensorflow/issues/31171#issuecomment-529169445
Perhaps something similar may apply here?

Related

Can't use 'put'() to add data to hbase with happybase

My python version is 3.7, and after I ran pip3 install happybase, I started the command hbase thrift start and tried to write a brief .py file as following:
import happybase
connection = happybase.Connection('master')
table = connection.table('jmlr') #'jmlr' is a table in hbase
for i in table.scan():
print(i)
table.put('001', {'title':'dasds'}) #error here
connection.close()
When it's about to run table.put(), it reported such an error:
thriftpy2.transport.base.TTransportException: TTransportException(type=4, message='TSocket read 0 bytes')
And at the same time, the thrift reported an error:
ERROR [thrift-worker-1] thrift.TBoundedThreadPoolServer: Error occurred during processing of message. java.lang.IllegalArgumentException: Invalid famAndQf provided.
But just now I ran this python file again, it gave me a different error in thrift:
thrift.TBoundedThreadPoolServer: Thrift error occurred during processing of message.
org.apache.thrift.protocol.TProtocolException: Bad version in readMessageBegin
I have tried to add parameters like protocol='compact', transport='framed', but this didn't work, even the table.scan() failed.
Everything in the hbase shell is OK, so I can't figure out what went wrong, I'm about to collapse.
I ran into the same issue and found this sollution. You need to add even empty Column Qualifier ( ':' symbol as delimiter between Column Family and Column Qualifier) into put() method:
table.put('001:', {'title':'dasds'})
Also, you have a different error message after second run of script because thrift server is already failed.
I hope it will help you.

Error: command "bash" failed with no error message?

I am using terraform on my Mac system, and terraform apply results with below error
Error: command "bash" failed with no error message
on ssm.tf line 7, in data "external" "ssm-dynamic-general":
7: data "external" "ssm-dynamic-general" {
However there is nothing wrong in ssm.tf file, same runs perfectly fine in my another system.
Can some one please let me know what i am missing here?
You might have done what I accidentally did: not follow the external program protocol:
https://www.terraform.io/docs/providers/external/data_source.html#external-program-protocol
In my particular case, I failed to send the errors that were coming from my program to standard error. Instead, those errors were going to standard out.
That's why Terraform wasn't able to report on those errors.
So if you send any and all errors from your program to standard error using > &2, you should be able to see those errors when you run terraform plan.

Cannot get schema from loadFunc org.apache.pig.builtin.AvroStorage

I am getting following error while running following pig script
REGISTER /opt/cloudera/parcels/CDH/lib/pig/lib/avro.jar
REGISTER /opt/cloudera/parcels/CDH/lib/pig/lib/json-simple-1.1.jar
REGISTER /opt/cloudera/parcels/CDH/lib/pig/lib/jackson-core-asl-1.8.8.jar
REGISTER /opt/cloudera/parcels/CDH/lib/pig/lib/jackson-mapper-asl-1.8.8.jar
REGISTER /opt/cloudera/parcels/CDH/lib/pig/piggybank.jar
list_cookies = LOAD '/user/xyz/testbed/llama-2014-Oct-12d/abc'
USING org.apache.pig.piggybank.storage.avro.AvroStorage();
got following error
2014-10-22 11:51:14,705 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2245: Cannot get schema from loadFunc org.apache.pig.builtin.AvroStorage
Details at logfile: /home/xyz/pig_1413991623605.log
In my case, it was simply the fact that the input folder did not exist. Pig error messages are off the mark and not at all helpful. After changing the input folder to one that existed, this error went away. So, be sure to check that before spending a lot of time more difficult debugging!

How to fix [BXSQ0001] An SQL exception occurred: 'No suitable driver found for jdbc:mysql://...?

I'm evaluating use of Base-X's SQL module with MySQL.
For a simple experiment I started with something similar to the example from http://docs.basex.org/wiki/SQL_Module:
let $conn := sql:connect("jdbc:postgresql://localhost:5432/coffeehouse")
return sql:execute($conn, "SELECT * FROM coffees WHERE price < 10")
(I changed the URL to my mysql database's URL). First attempt results in the error
[BXSQ0001] An SQL exception occurred: 'No suitable driver found for jdbc:mysql://localhost/dbname
I tried the obvious fix - dropped a copy of mysql-connector-java-5.1.26-bin.jar into C:\Program Files (x86)\BaseX\lib and restarted. But the error remains.
Any ideas?
BaseX ships with a couple of different start-up options - there is basex.exe in C:\Program Files (x86)\BaseX and basex.bat in C:\Program Files (x86)\BaseX\bin. The latter one seems to work as expected, the executable doesn't.

OS X NSTask error 22

I am building a simple package on OS X using pkgbuild that consists of a folder of stuff and the pre/postinstall scripts. When I try to execute the resulting package, the installer fails with the following message in the log:
Nov 1 13:28:11 localhost installd[631]: ./preinstall: 2013-11-01 13:28:11.074 installd[637:203] * NSTask: Task create for path '/tmp/PKInstallSandbox.P6mPx2/Scripts/com.xyz.utility.pkg.TWwYct/preinstall' failed: 22, "Invalid argument". Terminating temporary process.
The installer is running as root. The problem does not appear to be the contents of the scripts since they fail even after I cut them down to a simple "exit 0" with the interpreter declaration. This issues occurs on 10.8.2 and 10.8.4.
The issue looks like an exception that is thrown from within an NSTask object, but all I get is this 22 error code and the "Invalid argument" message. I think this message might refer to an NSInvalidArgumentException. I made sure the scripts are indeed being placed at the temporary location listed in the error message and they are there with the correct permissions.
Any ideas as to what causes this type of error message? I found several references to this error when I did some searching but there didn't seem to be a unifying cause or solution.
Add #!/bin/sh header into the preinstall script.

Resources