[apport] destar.py crashed with TypeError in file_input()

Bug #82286 reported by hanafi
126
This bug affects 3 people
Affects Status Importance Assigned to Milestone
destar (Ubuntu)
Invalid
Medium
Luca Falavigna
Nominated for Hardy by Alex Mauer
quixote1 (Ubuntu)
Fix Released
Medium
Luca Falavigna
Nominated for Hardy by Alex Mauer

Bug Description

error

ProblemType: Crash
Date: Tue Jan 30 15:27:55 2007
DistroRelease: Ubuntu 7.04
ExecutablePath: /usr/share/destar/python/destar.py
InterpreterPath: /usr/bin/python2.5
Package: destar 0.2.0-3ubuntu1
ProcCmdline: python /usr/share/destar/python/destar.py --daemonize --pid=/var/run/destar/destar.pid --port=8080
ProcCwd: /
ProcEnviron: PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
PythonArgs: ['/usr/share/destar/python/destar.py', '--daemonize', '--pid=/var/run/destar/destar.pid', '--port=8080']
SourcePackage: destar
Uname: Linux hanafi-laptop 2.6.20-5-generic #2 SMP Sat Jan 6 14:50:47 UTC 2007 i686 GNU/Linux

Revision history for this message
hanafi (kamil2004) wrote : Dependencies.txt
Revision history for this message
hanafi (kamil2004) wrote : ProcMaps.txt
Revision history for this message
hanafi (kamil2004) wrote : ProcStatus.txt
Revision history for this message
hanafi (kamil2004) wrote : Traceback.txt
Revision history for this message
Adrien Cunin (adri2000) wrote :

Confirmed, I can reproduce it and there is one duplicate.
It happens when launching the program.

Changed in destar:
importance: Undecided → Medium
Revision history for this message
Albin Tonnerre (lutin) wrote :

Given this part of the stacktrace:
File "/var/lib/python-support/python2.5/quixote/ptl_compile.py", line 58, in file_input
    io_imp = ast.From(IO_MODULE, [(IO_CLASS, None)])
it seems that the bug is rather in python-quixote1, as this call does not respect the compiler.ast.From.__init__() fonction prototype, which is def __init__(self, modname, names, level (the missing one), lineno=None)
Cheers

Changed in quixote1:
status: Unconfirmed → Confirmed
Revision history for this message
Pavel Mlčoch (pavkamlc) wrote :

I've the same problem.

Revision history for this message
Christian Mangold (neversfelde) wrote :

Same Problem here on a feisty installation.

Revision history for this message
Jussi Talaskivi (jptalask) wrote :

I believe there is a problem with the Python version used by Destar. I fixed the problem by replacing python with python2.4 at the top of /usr/share/destar/python/destar.py.

Revision history for this message
Pavel Mlčoch (pavkamlc) wrote : Re: [Bug 82286] Re: [apport] destar.py crashed with TypeError in file_input()

It works. So you should o it in repository.
Pavel Mlčoch.

Jussi Talaskivi napsal(a):
> I believe there is a problem with the Python version used by Destar. I
> fixed the problem by replacing python with python2.4 at the top of
> /usr/share/destar/python/destar.py.
>
>

Revision history for this message
ButterflyOfFire (butterflyoffire) wrote :

J'ai le meme probleme (I have the same problem)

Revision history for this message
Stefan Himpich (tmm) wrote :

still the same problem in hardy heron. Installing python2.4 and hardcoding it in /usr/share/destar/python/destar.py still works.

Revision history for this message
ddahl (david-ddahl) wrote :

Thank you!

David

On Tue, Apr 22, 2008 at 1:38 PM, Stefan Himpich <email address hidden> wrote:
> still the same problem in hardy heron. Installing python2.4 and
> hardcoding it in /usr/share/destar/python/destar.py still works.
>
> --
> [apport] destar.py crashed with TypeError in file_input()
> https://bugs.launchpad.net/bugs/82286
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
AshishBarot (ashishbarot) wrote :

Hello All,

Whenever i reboot the machine by the next time i am getting this message.
Means everyday when i start my machine i am getting it.

Does it related hardware? Not getting exact idea.

Thanks.
Ashish Barot.

Revision history for this message
Vernon Cole (vernondcole) wrote :

Is anyone working on updating destar.py to python 2.5 (or 2.6) ?
I believe that would fix this problem.
I can try it if the developers cant get to it.

Revision history for this message
Christian Mangold (neversfelde) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Can you try with latest Ubuntu release? Thanks in advance.

Revision history for this message
ddahl (david-ddahl) wrote :

It seems to be fixed. I am running Hardy with all of the latest updates.

Thank you for asking.

David

On Tue, Sep 9, 2008 at 3:56 AM, Christian Mangold
<email address hidden> wrote:
> Thank you for taking the time to report this bug and helping to make
> Ubuntu better. You reported this bug a while ago and there hasn't been
> any activity in it recently. We were wondering is this still an issue
> for you? Can you try with latest Ubuntu release? Thanks in advance.
>
> --
> [apport] destar.py crashed with TypeError in file_input()
> https://bugs.launchpad.net/bugs/82286
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Vernon Cole (vernondcole) wrote :
Download full text (4.1 KiB)

It is not fixed! I am running Hardy with the latest patches. I picked up
destar on this machine (which had asterisk installed, but not destar) using
synaptic after I received this message, so destar has not been patched, like
the copy on my other asterisk box. The result was:
---

wnvcole@wciptest:~$ destar
DeStar 0.2.2, Copyright (C) 2005 by Holger Schurig and contributors.

DeStar comes with ABSOLUTELY NO WARRANTY. This is free software,
you are welcome to redistribute it under certain conditions;
see the included files GPL-2.txt and COPYRIGHT.txt

Serving application 'page_main' on port 8080
warning: Computing default hostname
warning: Cannot do reverse lookup
info: Medusa (V1.2) started at Tue Sep 9 13:49:09 2008
    Hostname: 10.100.250.170
    Port:8080

Traceback (most recent call last):
  File "/usr/share/destar/python/destar.py", line 139, in <module>
    pub.run()
  File "/usr/share/destar/python/Server.py", line 168, in run
    publisher = self.publishclass(self.approot)
  File "/var/lib/python-support/python2.5/quixote/publish.py", line 107, in
__init__
    self.root_namespace = _get_module(root_namespace)
  File "/var/lib/python-support/python2.5/quixote/publish.py", line 32, in
_get_module
    __import__(name)
  File "/var/lib/python-support/python2.5/quixote/ptl_import.py", line 127,
in find_import_module
    return self.loader.load_module(fullname, stuff)
  File "/var/lib/python-support/python2.5/quixote/ptl_import.py", line 107,
in load_module
    return _load_ptl(name, filename, file)
  File "/var/lib/python-support/python2.5/quixote/ptl_import.py", line 72,
in _load_ptl
    code = compile_template(file, filename, output)
  File "/var/lib/python-support/python2.5/quixote/ptl_compile.py", line 297,
in compile_template
    template.compile()
  File "/usr/lib/python2.5/compiler/pycodegen.py", line 111, in compile
    tree = self._get_tree()
  File "/var/lib/python-support/python2.5/quixote/ptl_compile.py", line 268,
in _get_tree
    tree = parse(self.source, self.filename)
  File "/var/lib/python-support/python2.5/quixote/ptl_compile.py", line 223,
in parse
    return TemplateTransformer().parsesuite(buf)
  File "/usr/lib/python2.5/compiler/transformer.py", line 129, in parsesuite
    return self.transform(parser.suite(text))
  File "/usr/lib/python2.5/compiler/transformer.py", line 125, in transform
    return self.compile_node(tree)
  File "/usr/lib/python2.5/compiler/transformer.py", line 158, in
compile_node
    return self.file_input(node[1:])
  File "/var/lib/python-support/python2.5/quixote/ptl_compile.py", line 58,
in file_input
    io_imp = ast.From(IO_MODULE, [(IO_CLASS, None)])
TypeError: __init__() takes at least 4 arguments (3 given)

---
The error is in destar, not in Hardy, and the patch has been known for some
time. Destar needs to be updated for the current version of python. My
communication with the maintainers indicates that neither asterisk nor
destar is being kept up to patch level on Ubuntu. That is unfortunate. I
think that this combination is the best possibility to get "plug and play"
telephony on Ubuntu, so I wish we could convince them to invest some time in
it. The other asterisk front ends are too...

Read more...

Revision history for this message
ddahl (david-ddahl) wrote :
Download full text (4.7 KiB)

Sorry, I must have confused this with another bug where the crash
reporter opens every time destar crashes, even though I set the crash
reporter to ignore those crashes.

David

On Tue, Sep 9, 2008 at 1:13 PM, Vernon Cole <email address hidden> wrote:
> It is not fixed! I am running Hardy with the latest patches. I picked up
> destar on this machine (which had asterisk installed, but not destar) using
> synaptic after I received this message, so destar has not been patched, like
> the copy on my other asterisk box. The result was:
> ---
>
> wnvcole@wciptest:~$ destar
> DeStar 0.2.2, Copyright (C) 2005 by Holger Schurig and contributors.
>
> DeStar comes with ABSOLUTELY NO WARRANTY. This is free software,
> you are welcome to redistribute it under certain conditions;
> see the included files GPL-2.txt and COPYRIGHT.txt
>
> Serving application 'page_main' on port 8080
> warning: Computing default hostname
> warning: Cannot do reverse lookup
> info: Medusa (V1.2) started at Tue Sep 9 13:49:09 2008
> Hostname: 10.100.250.170
> Port:8080
>
> Traceback (most recent call last):
> File "/usr/share/destar/python/destar.py", line 139, in <module>
> pub.run()
> File "/usr/share/destar/python/Server.py", line 168, in run
> publisher = self.publishclass(self.approot)
> File "/var/lib/python-support/python2.5/quixote/publish.py", line 107, in
> __init__
> self.root_namespace = _get_module(root_namespace)
> File "/var/lib/python-support/python2.5/quixote/publish.py", line 32, in
> _get_module
> __import__(name)
> File "/var/lib/python-support/python2.5/quixote/ptl_import.py", line 127,
> in find_import_module
> return self.loader.load_module(fullname, stuff)
> File "/var/lib/python-support/python2.5/quixote/ptl_import.py", line 107,
> in load_module
> return _load_ptl(name, filename, file)
> File "/var/lib/python-support/python2.5/quixote/ptl_import.py", line 72,
> in _load_ptl
> code = compile_template(file, filename, output)
> File "/var/lib/python-support/python2.5/quixote/ptl_compile.py", line 297,
> in compile_template
> template.compile()
> File "/usr/lib/python2.5/compiler/pycodegen.py", line 111, in compile
> tree = self._get_tree()
> File "/var/lib/python-support/python2.5/quixote/ptl_compile.py", line 268,
> in _get_tree
> tree = parse(self.source, self.filename)
> File "/var/lib/python-support/python2.5/quixote/ptl_compile.py", line 223,
> in parse
> return TemplateTransformer().parsesuite(buf)
> File "/usr/lib/python2.5/compiler/transformer.py", line 129, in parsesuite
> return self.transform(parser.suite(text))
> File "/usr/lib/python2.5/compiler/transformer.py", line 125, in transform
> return self.compile_node(tree)
> File "/usr/lib/python2.5/compiler/transformer.py", line 158, in
> compile_node
> return self.file_input(node[1:])
> File "/var/lib/python-support/python2.5/quixote/ptl_compile.py", line 58,
> in file_input
> io_imp = ast.From(IO_MODULE, [(IO_CLASS, None)])
> TypeError: __init__() takes at least 4 arguments (3 given)
>
> ---
> The error is in destar, not in Hardy, and the patch has been known for some
> time. Destar needs to be updated for the current version of ...

Read more...

Revision history for this message
chesterharry (spacepimp) wrote :

I will try it out sometime tommorrow to see if i can reproduce it.

I do not think it has been occurring as of late.

On Tue, Sep 9, 2008 at 6:56 AM, Christian Mangold <email address hidden>wrote:

> Thank you for taking the time to report this bug and helping to make
> Ubuntu better. You reported this bug a while ago and there hasn't been
> any activity in it recently. We were wondering is this still an issue
> for you? Can you try with latest Ubuntu release? Thanks in advance.
>
> --
> [apport] destar.py crashed with TypeError in file_input()
> https://bugs.launchpad.net/bugs/82286
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Whoever fights monsters should see to it that in the process he does not
become a monster. And if you gaze long enough into an abyss, the abyss will
gaze back into you. Nietzsche

Revision history for this message
Orange Peel Beef (orangepeelbeef) wrote :

still exists for me as well.

Revision history for this message
Luca Falavigna (dktrkranz) wrote :

I just uploaded destar 0.2.2-5.1ubuntu1 and quixote1 1.2-4ubuntu1 to fix this bug.

Changed in destar:
assignee: nobody → dktrkranz
status: Confirmed → Fix Committed
Changed in quixote1:
assignee: nobody → dktrkranz
importance: Undecided → Medium
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package destar - 0.2.2-5.1ubuntu1

---------------
destar (0.2.2-5.1ubuntu1) intrepid; urgency=low

  * Merge from Debian unstable (LP: #82286). Remaining Ubuntu changes:
    - debian/rules: call dh_installinit with -- start 20 2 3 4 5 . stop 20 1 .
    - debian/destar.init: change Default-Stop: to 1

destar (0.2.2-5.1) unstable; urgency=low

  * Non-maintainer upload.
  * python25.dpatch. Fix syntax error. (Closes: #501207).
    + Thanks to John Wright for the patch.

 -- Luca Falavigna <email address hidden> Thu, 16 Oct 2008 20:39:00 +0200

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package quixote1 - 1.2-4ubuntu1

---------------
quixote1 (1.2-4ubuntu1) intrepid; urgency=low

  * ptl_compile.py:
    - Fix from Debian #484360 to avoid TypeError exception (LP: #82286).

 -- Luca Falavigna <email address hidden> Thu, 16 Oct 2008 20:55:46 +0200

Changed in destar:
status: Fix Committed → Fix Released
Changed in quixote1:
status: Fix Committed → Fix Released
Revision history for this message
Calabacin (raulgarciag) wrote :

I just tried to run destar on my Ubuntu Jaunty and I have a similar problem:
TypeError: import_module() takes at most 4 arguments (5 given)

Installed packages:
destar 0.2.2-5.2ubuntu1
python-quixote1 1.2-4.1ubuntu1

I tried installing python 2.4 and changing the first line in /usr/share/destar/python/destar.py from:
#!/usr/bin/env python

to
#!/usr/bin/env python2.4

But now I get a new error:
ImportError: No module named medusa

I guess this error came back after last packages' update ??

Revision history for this message
Calabacin (raulgarciag) wrote :

This error seems to have been reintroduced.

Changed in destar (Ubuntu):
status: Fix Released → Invalid
Revision history for this message
DarkJavi (darkjavi) wrote :

Same issue here on 8.04.

-install out the box
apt-get install destar
destar
TypeError: __init__() takes at least 4 arguments (3 given)
-then changed to python2.4
/usr/bin/env: python2.4: No such file or directory
-installed python 2.4and it works
-changed back to python on /usr/share/destar/python/destar.py to see what happens:
Serving application 'page_main' on port 8080
warning: Computing default hostname
info: Medusa (V1.11) started at Thu Nov 26 00:41:22 2009
 Hostname:
 Port:8080

Segmentation fault (core dumped)

So issue still here and still fixed changing to python2.4

Revision history for this message
Vincent (realmkeepersbox) wrote :

Same Issue also running Hardy.

Installed Python2.4 plus the exstras; python2.4-minimal, python-profiler, python2.4-doc, binfmt-support.

Hacked the server.py file to python2.4

> sudo less /usr/share/destar/python/Server.py
#!/usr/bin/env python2.4

"""quixote.server.medusa_http

An HTTP handler for Medusa that publishes a Quixote application.
"""

Restarted the Asteriks and destar deamons, restarted hardy, firewall is off and errors still stay the same.

> destar
DeStar 0.2.2, Copyright (C) 2005 by Holger Schurig and contributors.

DeStar comes with ABSOLUTELY NO WARRANTY. This is free software,
you are welcome to redistribute it under certain conditions;
see the included files GPL-2.txt and COPYRIGHT.txt

Serving application 'page_main' on port 8080
warning: Computing default hostname
info: Medusa (V1.11) started at Fri Jan 15 12:37:52 2010
 Hostname: Ubuntu-server.efc.local
 Port:8080

Traceback (most recent call last):
  File "/usr/share/destar/python/destar.py", line 139, in <module>
    pub.run()
  File "/usr/share/destar/python/Server.py", line 168, in run
    publisher = self.publishclass(self.approot)
  File "/var/lib/python-support/python2.5/quixote/publish.py", line 107, in __init__
    self.root_namespace = _get_module(root_namespace)
  File "/var/lib/python-support/python2.5/quixote/publish.py", line 32, in _get_module
    __import__(name)
  File "/var/lib/python-support/python2.5/quixote/ptl_import.py", line 127, in find_import_module
    return self.loader.load_module(fullname, stuff)
  File "/var/lib/python-support/python2.5/quixote/ptl_import.py", line 107, in load_module
    return _load_ptl(name, filename, file)
  File "/var/lib/python-support/python2.5/quixote/ptl_import.py", line 72, in _load_ptl
    code = compile_template(file, filename, output)
  File "/var/lib/python-support/python2.5/quixote/ptl_compile.py", line 297, in compile_template
    template.compile()
  File "/usr/lib/python2.5/compiler/pycodegen.py", line 111, in compile
    tree = self._get_tree()
  File "/var/lib/python-support/python2.5/quixote/ptl_compile.py", line 268, in _get_tree
    tree = parse(self.source, self.filename)
  File "/var/lib/python-support/python2.5/quixote/ptl_compile.py", line 223, in parse
    return TemplateTransformer().parsesuite(buf)
  File "/usr/lib/python2.5/compiler/transformer.py", line 129, in parsesuite
    return self.transform(parser.suite(text))
  File "/usr/lib/python2.5/compiler/transformer.py", line 125, in transform
    return self.compile_node(tree)
  File "/usr/lib/python2.5/compiler/transformer.py", line 158, in compile_node
    return self.file_input(node[1:])
  File "/var/lib/python-support/python2.5/quixote/ptl_compile.py", line 58, in file_input
    io_imp = ast.From(IO_MODULE, [(IO_CLASS, None)])
TypeError: __init__() takes at least 4 arguments (3 given)

Anybody with Ideas?
The thing that bugs me is that Python2.5 shows up in the error codes even after setting the server.py file from python to python2.4.

Thanks in advance.

Vincent

Alex Mauer (hawke)
Changed in destar (Ubuntu):
status: Invalid → New
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.