#126 closed defect (worksforme)
taskDaemon.py start: ImportError:cannot import name ConferenceSchedule
Reported by: | sylvestre | Owned by: | pferreir |
---|---|---|---|
Priority: | normal | Milestone: | v0.97.0 |
Component: | Installation | Version: | 0.97.0 |
Keywords: | Cc: |
Description
After fixing by hand bug #125 (getting the file from the source tree)
On the startup of taskDeamon.py, I get:
ImportError:cannot import name ConferenceSchedule?
I did a standard installation through easy_install.
Attachments (1)
Change History (17)
comment:1 Changed 6 years ago by pferreir
- Milestone set to v0.97
comment:2 Changed 6 years ago by pferreir
- Owner set to pferreir
- Status changed from new to assigned
comment:3 Changed 6 years ago by pferreir
I confirm that the file exists and is not empty. -rw-r--r-- 1 root root 16384 jan 13 22:14 /usr/lib/python2.5/site-packages/cds_indico-0.97b-py2.5.egg/MaKaC/schedule.py And I don't have any other 0 size file: # find . -size 0 ./RSSinterface/__init__.py ./PDFinterface/ttfonts/.keep ./services/__init__.py ./services/implementation/__init__.py ./services/interface/__init__.py ./services/interface/rpc/__init__.py ./consoleScripts/__init__.py ./fossils/__init__.py ./po/__init__.py
This is really weird. Is it possible to get a full traceback?
comment:4 Changed 6 years ago by sylvestre
Sorry there is no backtrace generated. I can test whatever you want.
comment:5 Changed 6 years ago by pferreir
The exception just shows up like this? No debugging output? This is really weird. How are you running the taskdaemon? easy_install should have installed it in your bin path.
comment:6 Changed 6 years ago by sylvestre
# taskDaemon start
Daemon started! (pid=13782)
ImportError:cannot import name ConferenceSchedule?
For what is worth, the strace show it finds the file but fails after that...
[pid 13926] open("/usr/lib/python2.5/site-packages/cds_indico-0.97b-py2.5.egg/MaKaC/schedule.py", O_RDONLY|O_LARGEFILE) = 4
[pid 13926] fstat64(4, {st_mode=S_IFREG|0644, st_size=16384, ...}) = 0
[pid 13926] open("/usr/lib/python2.5/site-packages/cds_indico-0.97b-py2.5.egg/MaKaC/schedule.pyc", O_RDONLY|O_LARGEFILE) = 5
[pid 13926] fstat64(5, {st_mode=S_IFREG|0644, st_size=18517, ...}) = 0
[pid 13926] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb793b000
[pid 13926] read(5, "\263\362\r\n\3207NKc\0\0\0\0\0\0\0\0\21\0\0\0@\0\0\0s*\1\0\0d\0\0"..., 4096) = 4096
[pid 13926] fstat64(5, {st_mode=S_IFREG|0644, st_size=18517, ...}) = 0
[pid 13926] read(5, "5/site-packages/cds_indico-0.97b-"..., 12288) = 12288
[pid 13926] read(5, "\0\0R\27\0\0\0RE\0\0\0(\0\0\0\0(\0\0\0\0sM\0\0\0/usr/l"..., 4096) = 2133
[pid 13926] read(5, ""..., 4096) = 0
[pid 13926] close(5) = 0
[pid 13926] munmap(0xb793b000, 4096) = 0
[pid 13926] close(4) = 0
[pid 13926] close(3) = 0
[pid 13926] fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 1), ...}) = 0
[pid 13926] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb793b000
[pid 13926] write(1, "ImportError:cannot import name Co"..., 50ImportError:cannot import name ConferenceSchedule?
comment:7 Changed 6 years ago by pferreir
Can you please diff the file you have with the one from the repository? It's very strange that it isn't able to import this particular class. If you do:
$ PYTHONPATH=indico/ python Python 2.6.3 (r263:75183, Oct 10 2009, 03:50:39) [GCC 4.3.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from MaKaC.schedule import ConferenceSchedule
comment:8 Changed 6 years ago by pferreir
(i meant PYTHONPATH=/path/to/your/indico/egg)
comment:9 Changed 6 years ago by sylvestre
OK, I found the issue.
I don't know why but the file from the easy_install (~10ko without any class) was different from the one in the tarball (~1ko with many classes).
Why it was there... I have not idea... Maybe the same kind of problem as in #125
comment:10 Changed 6 years ago by pferreir
- Resolution set to fixed
- Status changed from assigned to closed
I'll close it for lack of evidence. If someone else reports this issue I'll reopen it.
comment:11 Changed 6 years ago by pferreir
- Resolution fixed deleted
- Status changed from closed to reopened
comment:12 Changed 6 years ago by pferreir
- Resolution set to worksforme
- Status changed from reopened to closed
comment:13 Changed 6 years ago by sylvestre
As you wish but I can reproduce it anytime ...
comment:14 Changed 6 years ago by pferreir
You mean that if you delete the egg and easy_install it over again, it keeps failing?
Can you please attach your "class-less" schedule.py?
comment:15 Changed 6 years ago by sylvestre
I reinstall cds indico to reproduce this bug and I can confirm that it is failing again.
Doing this:
cp /path/to/tarball/cds-indico-0.97b/indico/MaKaC/schedule.py /usr/lib/python2.5/site-packages/cds_indico-0.97b-py2.5.egg/MaKaC/schedule.py
fixes the issue
comment:16 Changed 6 years ago by pferreir
OK, it seems the egg was somehow corrupted (weird...)
Can you please try it again?
Sorry for the trouble.
Is MaKaC/schedule.py OK? Maybe it's empty too?