TypeError: 'long' does not have the buffer interface in multi-part file enclosing fixed