TypeError: conversion from numpy.int64 to Decimal is not supported

Working in “02_market_and_fundamental_data\01_NASDAQ_TotalView-ITCH_Order_Book\02_rebuild_nasdaq_order_book.ipynb” and keep running into an issue after defining ‘get_messages’.

Here is the code I am executing. It looks slightly different than the code from the text because I have been trying to modify with some debugging tools to no avail.

And here is the error message.

Other than physically inspecting the ITCH data with something like HDFViewer and learning how to manipulate that data I am at a loss as to what should be done. I greatly appreciate any help someone may be able to provide.

I have the same issue as you. I fixed it by modifying the pytables.py file

                #v_dec = Decimal(v)
                v_dec = float(v)

However, I get another error now

ValueError: cannot process expression [stock_locate = stock_locate], [(stock_locate) == (stock_locate)] is not a valid condition

Did you fix your issue and how?

type of stock_locate local variable used in the where clause is causing issues.
One way is to cast it to int as below (line in the middle added):

        stock_locate = store.select('R', where='stock = stock').stock_locate.iloc[0]
        stock_locate = int(stock_locate)
        target = 'stock_locate = stock_locate'