dmnfarrell / tkintertable

A pure Python library for adding tables to a Tkinter application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python3: Errors

AokiAhishatsu opened this issue · comments

commented
C:\Users\kig0pkt12\AppData\Local\Programs\Python\Python37\python.exe C:/Code/test_project/test.py
Traceback (most recent call last):
  File "C:/Code/LeM_Test/P208_ASU_GUI/test.py", line 12, in <module>
    rowselectedcolor='yellow',reverseorder=1)
  File "C:\Users\kig0pkt12\AppData\Local\Programs\Python\Python37\lib\site-packages\tkintertable\Tables.py", line 60, in __init__
    self.ostyp = self.checkOSType()
  File "C:\Users\kig0pkt12\AppData\Local\Programs\Python\Python37\lib\site-packages\tkintertable\Tables.py", line 2243, in checkOSType
    ostyp = string.lower(os.environ[var])
AttributeError: module 'string' has no attribute 'lower'
commented

Already fixed in master - please release/update to PyPI

Will do that shortly. Any other bugs related to python 3 that you have seen please report.

commented

Current master, simple table with read_only=True in constructor.
Right- and Left-Click gives me:

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\kig0pkt12\AppData\Local\Programs\Python\Python37\lib\tkinter\__init__.py", line 1705, in __call__
    return self.func(*args)
  File "c:\code\tkintertable\tkintertable\Tables.py", line 915, in handle_left_click
    if self.read_only is True:
AttributeError: 'TableCanvas' object has no attribute 'read_only'
commented

I can still edit column header name despite read_only=True.
How can I disable right/context-menu completely?

this should be fixed now

1.3.2 is now released.

Hi all
I’m also getting this error using a tkintertable widget:
AttributeError: 'TableCanvas' object has no attribute 'read_only'
It happens when I’m click in the table to position my cursor in a cell.
Now you are writing there is a solution on this.
Where can I get the solution?
Being very new to Python, it is a bit confusing!
Thx a ton for your help!
Cheers
Michael

@SchuppiM
Is your version up to date?

@dmnfarrell
My tkinter version? I downloaded beginning of March. (very new to Python)
I have Python Version 37-32.
Can I check my tkinter Version?

how did you install tkintertable

@dmnfarrell
I downloaded it from... I think here...
Version 1.3, at least this is what it says in the CHANGES file.
Run the Setup.py

You can try install the latest version and see if that fixes it. latest is 1.3.2

@dmnfarrell
Do you have a link please? So I get the latest Version.
Can I simply replace the *.py I have installed or is it better to run the Setup?

Jus download the zip and run setup.py like you did before.
https://github.com/dmnfarrell/tkintertable/archive/master.zip

@dmnfarrell
Gr8! Thx a ton!

@dmnfarrell
Ok, gr8! The error is gone! Thx so much!
Now I have an other proble where I thought it is because of the error.
When I click in my table, it is not activation the row I clicked.
I have this statement
self.UsersWOTable.bind("", self.ClickinTableEvent)
that jumpes in to self.ClickinTableEvent and does there what it should do with the active row, but it should first activate the row I clicked....
Any idea?

oh, the values of self.UsersWOTable.getSelectedRow() and self.UsersWOTable.getSelectedColumn() are always those of the possition of the active row/column. Not the one I clicke latest.

@dmnfarrell
Hmmm, ok.... can I get the values of the row, col or cell I clicked last?

ok, Forget it, I found it.
Again! Thx so much for your help!!!!!!!