{"record":{"id":"7bfeab2feaaa34c4","repo":"sqlmapproject/sqlmap","slug":"switch-no-cast-is-incompatible-with-switch","errorCode":null,"errorMessage":"switch '--no-cast' is incompatible with switch '--hex'","messagePattern":"switch '--no-cast' is incompatible with switch '--hex'","errorType":"exception","errorClass":"SqlmapSyntaxException","httpStatus":null,"severity":"error","filePath":"lib/core/option.py","lineNumber":2891,"sourceCode":"    if conf.data and conf.nullConnection:\n        errMsg = \"option '--data' is incompatible with switch '--null-connection'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.string and conf.nullConnection:\n        errMsg = \"option '--string' is incompatible with switch '--null-connection'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.notString and conf.nullConnection:\n        errMsg = \"option '--not-string' is incompatible with switch '--null-connection'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.tor and conf.osPwn:\n        errMsg = \"option '--tor' is incompatible with switch '--os-pwn'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.noCast and conf.hexConvert:\n        errMsg = \"switch '--no-cast' is incompatible with switch '--hex'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.crawlDepth:\n        try:\n            xrange(conf.crawlDepth)\n        except OverflowError as ex:\n            errMsg = \"invalid value used for option '--crawl' ('%s')\" % getSafeExString(ex)\n            raise SqlmapSyntaxException(errMsg)\n\n    if conf.dumpAll and conf.search:\n        errMsg = \"switch '--dump-all' is incompatible with switch '--search'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.string and conf.notString:\n        errMsg = \"option '--string' is incompatible with switch '--not-string'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.regexp and conf.nullConnection:\n        errMsg = \"option '--regexp' is incompatible with switch '--null-connection'\"","sourceCodeStart":2873,"sourceCodeEnd":2909,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/core/option.py#L2873-L2909","documentation":"Startup mutual-exclusivity guard in _basicOptionValidation: --no-cast turns off automatic casting of retrieved data, while --hex forces hex representation; the two data-representation modes conflict. Fires when both conf.noCast and conf.hexConvert are set.","triggerScenarios":"Thrown at lib/core/option.py:2891 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Drop --no-cast and keep --hex for hex-encoded retrieval","Drop --hex and keep --no-cast to disable casting only"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}