Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6033337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:28:08+00:00 2026-05-23T05:28:08+00:00

The following small python program uses the KDE APIs to retrieve the contents of

  • 0

The following small python program uses the KDE APIs to retrieve the contents of an URL. Unfortunately, it segfaults. Am I doing anything wrong, or is this a bug in KDE?

kio.py:

#!/usr/bin/env python2
# coding: utf-8

from PyKDE4 import kdecore,kio
url = kdecore.KUrl("http://www.google.com")
print url
kio.KIO.get(url)
print "ok!"

Running it:

[joel@mouton tmp]$ ./kio.py 
PyQt4.QtCore.QUrl(u'http://www.google.com')
Segmentation fault (core dumped)

The backtrace:

(gdb) bt
#0  0xb6a352a4 in QObject::thread() const () from /usr/lib/libQtCore.so.4
#1  0xb46f0b43 in ?? () from /usr/lib/libkio.so.5
#2  0xb46f0eaa in KIO::Scheduler::doJob(KIO::SimpleJob*) () from /usr/lib/libkio.so.5
#3  0xb464bb8c in ?? () from /usr/lib/libkio.so.5
#4  0xb464d81a in KIO::TransferJob::TransferJob(KIO::TransferJobPrivate&) () from /usr/lib/libkio.so.5
#5  0xb4652c69 in KIO::get(KUrl const&, KIO::LoadType, QFlags<KIO::JobFlag>) () from /usr/lib/libkio.so.5
#6  0xb4b0649b in ?? () from /usr/lib/python2.7/site-packages/PyKDE4/kio.so
#7  0xb762425a in PyCFunction_Call () from /usr/lib/libpython2.7.so.1.0
#8  0xb7682182 in PyEval_EvalFrameEx () from /usr/lib/libpython2.7.so.1.0
#9  0xb7683f70 in PyEval_EvalCodeEx () from /usr/lib/libpython2.7.so.1.0
#10 0xb76840c3 in PyEval_EvalCode () from /usr/lib/libpython2.7.so.1.0
#11 0xb769dc0b in run_mod () from /usr/lib/libpython2.7.so.1.0
#12 0xb769eaf2 in PyRun_FileExFlags () from /usr/lib/libpython2.7.so.1.0
#13 0xb769f7cc in PyRun_SimpleFileExFlags () from /usr/lib/libpython2.7.so.1.0
#14 0xb76a0372 in PyRun_AnyFileExFlags () from /usr/lib/libpython2.7.so.1.0
#15 0xb76b18fc in Py_Main () from /usr/lib/libpython2.7.so.1.0
#16 0x08048557 in main ()

I’m using the latest python 2.7 on Arch Linux, if that matters.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T05:28:08+00:00Added an answer on May 23, 2026 at 5:28 am

    You need to have an event loop running in order fo this to work, which means a Q or KApplication depending on what you’re using. I usually use a KApplication.

    Some more information on KIO usage with PyKDE4 is available in the KDE Examples module:

    https://projects.kde.org/projects/kde/kdeexamples/repository/revisions/master/show/bindings/python/kio

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following (a small C program and a python script that calls it) behave
I encounter the following small annoying dilemma over and over again in Python: Option
PostgreSQL is about to make me punch small animals. I'm doing the following SQL
I have written a small program in WindowsXP-python-pygame. It runs fine when I run
I don't understand why the following small console application does not compile: program Project1;
SMALL VERSION OF THE QUESTION : I need a lib for python or program
A small - little question. I have seen many application having buttons like following.
I am saving some small images to Xml as a Byte[] via the following
I'm writing a small webapp in Grails and I have the following question regarding
I am implementing a small database(university Project) and i am facing the following problem.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.