Archive for the ‘Mini-tips’ Category

KeyError: ‘\n\n’ when trying to format string in python

March 17, 2018 Leave a comment

I was getting the error this error:

KeyError: ‘\n\n’

when trying to do a str.format(*vals) in python

the issue was that the str, had some {} as part of the template, to fix this I just double the brackets {{}}


you can check a similar error here :

Categories: Mini-tips, Python

liquibase.exception.LockException: Could not acquire change log lock

March 10, 2018 Leave a comment


Categories: Mini-tips, MySQL, Tips

Partial search redis key

March 1, 2018 Leave a comment
scan 0 match *myPartialKey*
Categories: Mini-tips, Tips

Built-in web server python 3.x

December 11, 2017 Leave a comment

python -m http.server [portNo]

Built-in web server python 2.7

October 18, 2017 Leave a comment

The next command helps you to create a simple http server to test anything fast, or use that location and their resources with a different port.
Just navigate in the command line to the location and type the next:

python -m SimpleHTTPServer [port]
Categories: Beyond, Mini-tips, Python, Tips

Fixing: Error: Couldn’t find preset “latest” relative to directory

July 22, 2017 Leave a comment

Add the babel-preset-latest to the node_modules of the project directory with –save-dev option, in example:
npm install –save-dev babel-preset-latest

PD. This issue came up when configuring webpack on a project recently created from scratch, and configured the babel-loader with the latest as preset.

Command npm to check for installed packages

July 22, 2017 Leave a comment

npm list -g –depth=0