Skip to content

Instantly share code, notes, and snippets.

View mattdimicelli's full-sized avatar

Matthew Di Micelli mattdimicelli

View GitHub Profile
server Listening on port 4000 +0ms
app Connected to MongoDB +485ms
/home/mrd2689a/Documents/the_odin_project/Express_MongoDB_Supermarket_Inventory_2/node_modules/bson/lib/error.js:41
var _this = _super.call(this, message) || this;
^
BSONTypeError: Argument passed in must be a string of 12 bytes or a string of 24 hex characters
at new BSONTypeError (/home/mrd2689a/Documents/the_odin_project/Express_MongoDB_Supermarket_Inventory_2/node_modules/bson/lib/error.js:41:28)
at new ObjectId (/home/mrd2689a/Documents/the_odin_project/Express_MongoDB_Supermarket_Inventory_2/node_modules/bson/lib/objectid.js:65:23)
@mattdimicelli
mattdimicelli / gist:78f175f357d8c0b5ce1b679f7e49389c
Created July 25, 2020 22:11
help with order in dictionary output
def make_album(artist, album_name, songs = None):
''' Makes a dictionary describing a music album'''
if songs:
album = {artist, album_name, songs}
else:
album = {artist, album_name}
return album
album1 = make_album("Guns n' Roses", "The Spaghetti Incident")
print(album1)
album2 = make_album("Pink Floyd", "The Wall", "10")