-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rules_model_qt won't work - AttributeError: 'unicode' object has no attribute 'toString' #19
Comments
I just started looking into track, but my guess is, that this is just a consequence from migrating the application from python2 to python3. Your issue is kind of easily resolved. Just drop the #Makes it editable:
def setData(self, index, value, role):
if value != "":
regex_str=str(value.toString())
try:
re.compile(regex_str)
is_valid = True
except re.error:
is_valid = False
if(is_valid):
self._rules[index.row()][index.column()-1] = str(value.toString())
self.modified_rules.emit()
self.save_to_disk()
else:
self._rules[index.row()][index.column()-1] = "invalid regex"
return True Sadly after succeeding with that, we run into another issue, since As a workaround you can add your rules by adding them to |
Just had a look at the history of rules_model_qt.py. edit: |
…st#19 Removing "toString" unneeded method and "save_to_disk()" call as is not implemented (keep this in TODO list)
Removing some crashes that are allready commented in isue #19
This happens when you hit "new regexp rule"
To reproduce that:
python track
or./track
. Qy5 windows opens.I am currently using Ubuntu16.04, Python 2.7.12-final and Pytqt5 (as per my version of Python2)
The text was updated successfully, but these errors were encountered: