This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |