today,when I use python 3.7, pytorch 1.2 and torchtext 0.4.0, a error occur.
OverflowError: Python int too large to convert to C long.
reason is about : maxInt = sys.maxsize > somevalue, in utils.py code is like this:
maxInt = sys.maxsize
while True:
# decrease the maxInt value by factor 10
# as long as the OverflowError occurs.
try:
csv.field_size_limit(maxInt)
break
except OverflowError:
maxInt = int(maxInt / 10)
csv.field_size_limit(sys.maxsize)

I correct this codes  as follows:
maxInt = sys.maxsize
while True:
# decrease the maxInt value by factor 10
# as long as the OverflowError occurs.
try:
csv.field_size_limit(maxInt)
break
except OverflowError:
maxInt = int(maxInt / 10)
# csv.field_size_limit(sys.maxsize)
csv.field_size_limit(maxInt)

then, the erroe is disapper.!
codeerror|690x419 10