frans-fuerst / track

personal computer usage tracker
Apache License 2.0
57 stars 11 forks source link

TypeError: can only join an iterable #1

Closed opalepatrick closed 9 years ago

opalepatrick commented 9 years ago

Thanks you for this project. I feel it is much needed. Unfortunatley I am not a developer, just an Arch Linux user.

When I run the script I the app starts but there is no activity. The terminal reports an error:

TypeError: can only join an iterable

Do you have a clue what this could be referring to? Do you meed more info?

Actually this is the repeating traceback:

Traceback (most recent call last): File "track.py", line 63, in update_idle self._tracker.update() File "/repo/resources/code_and_apps/track/timetracker.py", line 578, in update self._current_process_exe = applicationinfo.get_active_process_name() File "/repo/resources/code_and_apps/track/desktop_usage_info/backend_x11/applicationinfo.py", line 68, in get_active_process_name return ' '.join(process.cmdline) TypeError: can only join an iterable

frans-fuerst commented 9 years ago

Thanks for the feedback! I don't know when this can happen - I never had this case before. I've added an extra catch clause for handling an empty process.cmdline. Please tell me if this works for you now.

opalepatrick commented 9 years ago

Thanks a lot - it is now working with the message: strange: process.cmdline is of type "<type 'instancemethod'>" every second. Thank you for the quick response. Just need to go and learn a bit more about interpretation and auto starting :-)

frans-fuerst commented 9 years ago

That's indeed strange and should not happen. I will have a closer look at that soon. Are there any application names resolved in your case? And are there any more hints on the command line? If you intend to go deeper into Python you could download an IDE like WingIDE (https://wingware.com/downloads/wingide-101) or PyCharm and debug into that code by setting a breakpoint and running the script.

frans-fuerst commented 9 years ago

Can you please give it a try again? Probably I found the issue and solved it. Most likely you have python-psutil 2.x installed?

opalepatrick commented 9 years ago

That is now operating without repeat messages. The only message I am now getting on launch is:

/usr/lib/python2.7/site-packages/gtk-2.0/gtk/init.py:127: RuntimeWarning: PyOS_InputHook is not available for interactive use of PyGTK set_interactive(1)

You are probably right about psutils (just cant work out how to get version number of that), but I am using python 2.7.9 and the the machine is up-to-date.

Sorry I didn't come back sooner.