Bug 342468

Summary: KDE Python Template not running out of the box, but with small modifications to the code,
Product: [Developer tools] kapptemplate Reporter: hanslovsky <Philipp.Hanslovsky+kde.bugs>
Component: generalAssignee: Anne-Marie Mahfouf <annma>
Status: RESOLVED NOT A BUG    
Severity: minor CC: codestruct, Philipp.Hanslovsky
Priority: NOR Keywords: triaged
Version First Reported In: 0.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description hanslovsky 2015-01-04 01:01:17 UTC
Out of curiosity, I installed kapptemplate and tried to run the python calendar example. However, when I ran python MYAPP.py, the program crashed.

Two simple modifications of MYAPP.py (or kapptemplate/src/templates/Python/pykde4app/) allowed for a successful run:

1. line 36:
     self.ui.calendarwidget.selectionChanged.connect(self.showDate)
 -> self.ui.calendarWidget.selectionChanged.connect(self.showDate) 

2. line 44:
     self.actionCollection().addAction("showcurrentmonth", curMonthAction)
 -> self.actionCollection().addAction("showcurrentmonth", self.curMonthAction)

Reproducible: Always

Steps to Reproduce:
1. Create python calendar app in kapptemplate and cd into app directory
2. run python <app-name>.py



Actual Results:  
Traceback (most recent call last):
  File "abcdefg.py", line 79, in <module>
    window = abcdefg()
  File "abcdefg.py", line 36, in __init__
    self.ui.calendarwidget.selectionChanged.connect(self.showDate)
AttributeError: 'QWidget' object has no attribute 'calendarwidget'

Expected Results:  
Start calendar app

See solution in Details above.
Comment 1 Gregor Mi 2018-08-08 09:28:04 UTC
Hi, thanks for the report. Could you please describe in detail how you ran the "python calendar" example. On my installation of KAppTemplate I cannot find it.
Comment 2 Andrew Crouthamel 2018-09-28 03:15:40 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Philipp Hanslovsky 2018-09-28 11:16:12 UTC
With the current version of kapptemplate (18.08.1-1 from Arch Linux Extra) on my machine I do not see the calendar app in the list of templates. Unfortunately, the original post is quite old and I do not have any recollection if I got that template from somewhere else (which would not be a bug of this project, of course).

When I google some of the lines in the error message, I find the kdesdk repo on github:
https://github.com/wyuka/kdesdk
The repo has not been modified in six years.

Due to the lack of reproduciability, consider this issue resolved.