Error: invalid argument 0: json: cannot unmarshal hex string of odd length into Go struct field SendTxArgs.data of type hexutil.Bytes - vagrant

i have a problem that i've been trying to solve for a whole day...
I'm using Vagrant and truffle to migrate a couple of SmartContracts. The problem
occurs right at the migration when i get an error for one of the contracts.
This is the output of the console, any help will be very much appriciated:
Deploying StringUtils...
... 0xfff3df73a1aa886c9006dab692b3dd36fa0f0b4ab1a1f8a933b679c7d17cbadc
StringUtils: 0x9d13c6d3afe1721beef56b55d303b09e021e27ab
Linking StringUtils to Appalto
Deploying Appalto...
... undefined
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: invalid argument 0: json: cannot unmarshal hex string of odd length into Go struct field SendTxArgs.data of type hexutil.Bytes
at Object.InvalidResponse (C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\web3\lib\web3\errors.js:38:1)
at C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\web3\lib\web3\requestmanager.js:86:1
at C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-migrate\index.js:225:1
at C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-provider\wrapper.js:134:1
at XMLHttpRequest.request.onreadystatechange (C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\web3\lib\web3\httpprovider.js:128:1)
at XMLHttpRequestEventTarget.dispatchEvent (C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\xhr2\lib\xhr2.js:64:1)
at XMLHttpRequest._setReadyState (C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\xhr2\lib\xhr2.js:354:1)
at XMLHttpRequest._onHttpResponseEnd (C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\xhr2\lib\xhr2.js:509:1)
at IncomingMessage.<anonymous> (C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\xhr2\lib\xhr2.js:469:1)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)```

Related

changing CRS in GeoPandas

I'm trying to change the CRS of a geopandas dataframe. The current CRS is:
Name: unknown
Axis Info [ellipsoidal]:
- lon[east]: Longitude (degree)
- lat[north]: Latitude (degree)
Area of Use:
- undefined
Datum: World Geodetic System 1984
- Ellipsoid: WGS 84
- Prime Meridian: Greenwich
When I try dfTrans.to_crs('epsg:4326') I get the following error:
pyproj.exceptions.CRSError: Invalid projection: epsg:4326: (Internal Proj Error: proj_create: cannot build geodeticCRS 4326: SQLite error on SELECT name, ellipsoid_auth_name, ellipsoid_code, prime_meridian_auth_name, prime_meridian_code, area_of_use_auth_name, area_of_use_code, publication_date, deprecated FROM geodetic_datum WHERE auth_name = ? AND code = ?: no such column: publication_date)
For a simple command in pyproj, pyproj.CRS.from_epsg(4326), I get the same error:
File "pyproj/_crs.pyx", line 1738, in pyproj._crs._CRS.__init__
pyproj.exceptions.CRSError: Invalid projection: epsg:4326: (Internal Proj Error: proj_create: cannot build geodeticCRS 4326: SQLite error on SELECT name, ellipsoid_auth_name, ellipsoid_code, prime_meridian_auth_name, prime_meridian_code, area_of_use_auth_name, area_of_use_code, publication_date, deprecated FROM geodetic_datum WHERE auth_name = ? AND code = ?: no such column: publication_date)
I don't know enough to know what's going on, but it seems like there's an underlying function that calls a column that doesn't exist. Any ideas how to fix this or work around it?
I got that same error when using Proj-5.x. It seems that the 'publication_date' column is a Proj-6 or Proj-7 item (which both require SQLite.)

How to get file name that causes GraphQLError: Syntax Error: Unterminated string

In our team we sometimes get an GraphQl syntax error, when modifying our schema.
However, we don't seem to get the name of file causing the issue? The error looks like this:
GraphQLError: Syntax Error: Unterminated string.
at syntaxError (<full-path-to-project>>node_modules/graphql/error/syntaxError.js:15:10)
at readString (<full-path-to-project>>node_modules/graphql/language/lexer.js:513:38)
at readToken (<full-path-to-project>>node_modules/graphql/language/lexer.js:267:14)
at Object.lookahead (<full-path-to-project>>node_modules/graphql/language/lexer.js:54:43)
at Object.advanceLexer [as advance] (<full-path-to-project>>node_modules/graphql/language/lexer.js:44:33)
at Parser.parseStringLiteral (<full-path-to-project>>node_modules/graphql/language/parser.js:519:17)
at Parser.parseDescription (<full-path-to-project>>node_modules/graphql/language/parser.js:728:19)
at Parser.parseFieldDefinition (<full-path-to-project>>node_modules/graphql/language/parser.js:856:28)
at Parser.optionalMany (<full-path-to-project>>node_modules/graphql/language/parser.js:1497:28)
at Parser.parseFieldsDefinition (<full-path-to-project>>node_modules/graphql/language/parser.js:846:17)
at Parser.parseObjectTypeDefinition (<full-path-to-project>>node_modules/graphql/language/parser.js:798:23)
at Parser.parseTypeSystemDefinition (<full-path-to-project>>node_modules/graphql/language/parser.js:696:23)
at Parser.parseDefinition (<full-path-to-project>>node_modules/graphql/language/parser.js:146:23)
at Parser.many (<full-path-to-project>>node_modules/graphql/language/parser.js:1518:26)
at Parser.parseDocument (<full-path-to-project>>node_modules/graphql/language/parser.js:111:25)
at parse (<full-path-to-project>>node_modules/graphql/language/parser.js:36:17) {
message: 'Syntax Error: Unterminated string.',
locations: [ { line: 27, column: 51 } ]
}
Is this normal - and how do I get the file causing the problem?

am I setting the schema wrongly?

am I setting the schema wrongly? I can mutation & Query in playground, but in the frontend hit this error: "Network error: Unexpected token < in JSON at position 0", then I checked in backend, that shows below message, may anyone help me?
# import * from './generated/prisma.graphql'
type Mutation{
createLeague(name: String, zhName: String, image: String, season: String, nation: String, clubs: Club): League!
createClub(name: String, zhName: String, tla: String, badge: String, leagues: League): Club!
}
type Query{
leagues: [League]!
clubs: [Club]!
}
Error: The type of Mutation.createLeague(clubs:) must be Input Type but got: Club.
The type of Mutation.createClub(leagues:) must be Input Type but got: League.
at assertValidSchema (/mnt/c/Users/chisi/coding/tipson0.1/server/node_modules/graphql/type/validate.js:78:11)
at Object.validate (/mnt/c/Users/chisi/coding/tipson0.1/server/node_modules/graphql/validation/validate.js:55:35)
at doRunQuery (/mnt/c/Users/chisi/coding/tipson0.1/server/node_modules/apollo-server-core/dist/runQuery.js:111:42)
at /mnt/c/Users/chisi/coding/tipson0.1/server/node_modules/apollo-server-core/dist/runQuery.js:21:56
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: The type of Mutation.createLeague(clubs:) must be Input Type but got: Club.
The type of Mutation.createClub(leagues:) must be Input Type but got: League.
at assertValidSchema (/mnt/c/Users/chisi/coding/tipson0.1/server/node_modules/graphql/type/validate.js:78:11)
at Object.validate (/mnt/c/Users/chisi/coding/tipson0.1/server/node_modules/graphql/validation/validate.js:55:35)
at doRunQuery (/mnt/c/Users/chisi/coding/tipson0.1/server/node_modules/apollo-server-core/dist/runQuery.js:111:42)
at /mnt/c/Users/chisi/coding/tipson0.1/server/node_modules/apollo-server-core/dist/runQuery.js:21:56
at process._tickCallback (internal/process/next_tick.js:68:7)

Service Now : transform map stopped due to error: java.lang.NumberFormatException

The transform is getting aborted but only if I marked the checkbox copy empty fields and also the rest of the entry of the Import set is getting stuck at pending, also I verified the transform script but no luck.
Below is the error :
Import set: ISETxxxxxxx transform stopped due to error: java.lang.NumberFormatException
java.lang.NumberFormatException
at java.math.BigDecimal.<init>(BigDecimal.java:596)
at java.math.BigDecimal.<init>(BigDecimal.java:383)
at java.math.BigDecimal.<init>(BigDecimal.java:806)
at com.glide.script.glide_elements.GlideNumber.getSafeBigDecimal(GlideNumber.java:42)
at com.glide.currency.GlideElementCurrency.coerceAmount(GlideElementCurrency.java:406)
at com.glide.currency.GlideElementCurrency.cleanAmount(GlideElementCurrency.java:389)
at com.glide.currency.GlideElementCurrency.setDisplayValue(GlideElementCurrency.java:136)
at com.glide.currency.GlideElementCurrency.setValue(GlideElementCurrency.java:89)
at com.glide.db.impex.transformer.TransformerField.copyEmptyFields(TransformerField.java:202)
at com.glide.db.impex.transformer.TransformerField.setValue(TransformerField.java:130)
at com.glide.db.impex.transformer.TransformerField.transformField(TransformerField.java:84)
at com.glide.db.impex.transformer.TransformRow.transformCurrent(TransformRow.java:100)
at com.glide.db.impex.transformer.TransformRow.transform(TransformRow.java:69)
at com.glide.db.impex.transformer.Transformer.transformBatch(Transformer.java:150)
at com.glide.db.impex.transformer.Transformer.transform(Transformer.java:76)
at com.glide.system_import_set.ImportSetTransformerImpl.transformEach(ImportSetTransformerImpl.java:239)
at com.glide.system_import_set.ImportSetTransformerImpl.transformAllMaps(ImportSetTransformerImpl.java:91)
at com.glide.system_import_set.ImportSetTransformer.transformAllMaps(ImportSetTransformer.java:64)
at com.glide.system_import_set.ImportSetTransformer.transformAllMaps(ImportSetTransformer.java:50)
at com.snc.automation.ScheduledImportSetJob.runImport(ScheduledImportSetJob.java:55)
at com.snc.automation.ScheduledImportJob.execute(ScheduledImportJob.java:45)
at com.glide.schedule.JobExecutor.execute(JobExecutor.java:83)
at com.glide.schedule.GlideScheduleWorker.executeJob(GlideScheduleWorker.java:207)
at com.glide.schedule.GlideScheduleWorker.process(GlideScheduleWorker.java:145)
at com.glide.schedule.GlideScheduleWorker.run(GlideScheduleWorker.java:62)
I'm guessing you have a field that required that is a decimal or similar.
The error java.lang.NumberFormatException indicates it's failing to convert an empty string to 0.0.
Use a source script line to convert this, something along the lines of this
answer = (function transformEntry(source) {
if (source.u_number_field.nil())
return 0.0;
})(source);

Parse.com CloudCode beforeSave trigger errors

Context: parse.com CloudCode, executing beforeSave() trigger on data object object update.
Getting a rash of unexplained errors in simple trigger function (code below). The errors are mostly
Result: Uncaught undefined
but there are also several
Result: Execution timed out
The code is simple, I have checked it to the point where I don't think this is an error due to the code, but including it anyway since I know people will ask to see it.
This seems (seems!) to be an issue in Parse itself, which I've been unable to solve.
Parse.Cloud.beforeSave("LogoItem", function(request, response) {
var name = request.object.get("productName");
if (typeof name == "undefined") {
name = "";
}
request.object.set("lowercaseName", name.toLowerCase());
response.success(); // Tells parse not to cancel save
});
My question is, has anyone seen this and been able to get any handle on a solution?
Below is some additional detail (logs from parse) that likely won't be too useful (but never know)...
E2016-03-14T14:12:26.306Z] - v643 Ran job ShopSenseJob with:
Input: {"plan":"paid"}
Result: ERROR: startDownloadItems() failed with error [undefined: undefined] undefined: undefined
E2016-03-14T14:11:01.536Z] - v643 before_save triggered for LogoItem as master:
Input: {"original":{"activeURL":"http://api.shopstyle.com/action/apiVisitRetailer?id=486671765\u0026pid=uid4009-26060253-59","category":5,"createdAt":"2016-03-14T13:41:07.487Z","imageURL":"https://resources.shopstyle.com/pim/aa/92/aa9286b799d7640f276657fa5e41ee92_best.jpg","importMarkerTag":6624,"lowercaseName":"mid rise skinny with knee holes in marie vintage blue","objectId":"8o9e8nMF7m","productName":"Mid Rise Skinny With Knee Holes In Marie Vintage Blue","referenceURL":"http://www.shopstyle.com/p/7-for-all-mankind-mid-rise-skinny-with-knee-holes-in-marie-vintage-blue/486671765?pid=uid4009-26060253-59","ssBrandId":3,"ssBrandName":"7 For All Mankind","ssDate":{"__type":"Date","iso":"2014-12-05T00:00:00.000Z"},"ssId":486671765,"ssRetailerId":193,"thumbnailURL":"https://resources.shopstyle.com/pim/aa/92/aa9286b799d7640f276657fa5e41ee92_best.jpg","updatedAt":"2016-03-14T13:41:07.487Z"},"update":{"importMarkerTag":1556}}
Result: Execution timed out
E2016-03-14T14:10:21.498Z] - v643 Ran job ShopSenseJob with:
Input: {}
Result: ERROR: startDownloadItems() failed with error [undefined: undefined] undefined: undefined
E2016-03-14T14:08:18.638Z] - v643 before_save triggered for LogoItem as master:
Input: {"original":{"activeURL":"http://api.shopstyle.com/action/apiVisitRetailer?id=490062821\u0026pid=uid4009-26060253-59","category":2,"createdAt":"2016-03-14T13:40:12.971Z","imageURL":"https://resources.shopstyle.com/pim/20/cb/20cb7387834dd02ac9d950bde0f57b83_best.jpg","importMarkerTag":1556,"lowercaseName":"baggu basic tote in brown","objectId":"I4UTiUMnUG","productName":"Baggu Basic Tote In Brown","referenceURL":"http://www.shopstyle.com/p/baggu-basic-tote-in-brown/490062821?pid=uid4009-26060253-59","ssBrandId":-1,"ssBrandName":"","ssDate":{"__type":"Date","iso":"2014-12-03T00:00:00.000Z"},"ssId":490062821,"ssRetailerId":193,"thumbnailURL":"https://resources.shopstyle.com/pim/20/cb/20cb7387834dd02ac9d950bde0f57b83_best.jpg","updatedAt":"2016-03-14T14:06:12.708Z"},"update":{"importMarkerTag":1556}}
Result: Uncaught undefined
E2016-03-14T14:08:18.225Z] - v643 Ran job ShopSenseJob with:
Input: {}
Result: ERROR: startDownloadItems() failed with error [undefined: undefined] undefined: undefined
E2016-03-14T14:06:12.824Z] - v643 before_save triggered for LogoItem as master:
Input: {"original":{"activeURL":"http://api.shopstyle.com/action/apiVisitRetailer?id=489915836\u0026pid=uid4009-26060253-59","category":2,"createdAt":"2016-03-14T13:40:13.193Z","imageURL":"https://resources.shopstyle.com/pim/14/ef/14ef17ff769227c4293892e770fcf50a_best.jpg","importMarkerTag":1556,"lowercaseName":"basic tote in black","objectId":"JQ7GuRjfgH","productName":"Basic Tote In Black","referenceURL":"http://www.shopstyle.com/p/baggu-basic-tote-in-black/489915836?pid=uid4009-26060253-59","ssBrandId":25820,"ssBrandName":"Baggu","ssDate":{"__type":"Date","iso":"2014-12-02T00:00:00.000Z"},"ssId":489915836,"ssRetailerId":193,"thumbnailURL":"https://resources.shopstyle.com/pim/14/ef/14ef17ff769227c4293892e770fcf50a_best.jpg","updatedAt":"2016-03-14T14:06:10.013Z"},"update":{"importMarkerTag":1556}}
Result: Execution timed out
E2016-03-14T14:05:23.844Z] - v643 Ran job ShopSenseJob with:
Input: {}
Result: ERROR: startDownloadItems() failed with error [undefined: undefined] undefined: undefined

Resources