You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.
I wrote an incredibly simple program to input text and URLs from a file, parsed by the program, passed to pygooglechart, and then downloaded.
upon encountering a text file with a 'forward slash', the program crashes, apparently recognizing the text as a unix file path.
My program code:
!/usr/bin/python
import os
import math
import sys
from pygooglechart import QRChart
ROOT = os.path.dirname(os.path.abspath(file))
sys.path.insert(0, os.path.join(ROOT, '..'))
text_file = open("urls.txt", "r")
lines = text_file.readlines()
print lines
print len(lines)
for line in lines:
print line
# Chart size
chart = QRChart(400,400)
# Chart text
chart.add_data(line)
# Set level of error correction, and 0 pixel margin
chart.set_ec('H',0)
# Download final image
chart.download(line +".png")
text_file.close()
The text was updated successfully, but these errors were encountered: