<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>22195</bug_id>
          
          <creation_ts>2009-11-06 14:26:33 +0300</creation_ts>
          <short_desc>ImportError: cannot import name c</short_desc>
          <delta_ts>2009-11-10 15:36:01 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>python-module-pylons</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Vladimir V. Kamarzin">vvk</reporter>
          <assigned_to name="Ivan Zakharyaschev">imz</assigned_to>
          <cc>antohami</cc>
    
    <cc>cas</cc>
    
    <cc>cow</cc>
    
    <cc>darktemplar</cc>
    
    <cc>enp</cc>
    
    <cc>evg</cc>
    
    <cc>george</cc>
    
    <cc>grenka</cc>
    
    <cc>lav</cc>
    
    <cc>mithraen</cc>
    
    <cc>nbr</cc>
    
    <cc>obirvalger</cc>
    
    <cc>qa_viy</cc>
    
    <cc>real.altlinux.org</cc>
    
    <cc>rider</cc>
    
    <cc>sem</cc>
    
    <cc>shaba</cc>
    
    <cc>sin</cc>
    
    <cc>slev</cc>
    
    <cc>vitty</cc>
    
    <cc>viy</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>102748</commentid>
    <comment_count>0</comment_count>
    <who name="Vladimir V. Kamarzin">vvk</who>
    <bug_when>2009-11-06 14:26:33 +0300</bug_when>
    <thetext># paster setup-app prod.ini   
...
  File &quot;/usr/lib/python2.5/site-packages/Orphereus/lib/helpers.py&quot;, line 28, in &lt;module&gt;
    from pylons import config, request, c, g
ImportError: cannot import name c

Проблема похоже известная, см.
http://groups.google.com/group/pylons-discuss/browse_thread/thread/f96ca909d0928501?pli=1
http://pylonshq.com/project/pylonshq/ticket/652

Оба приведённых решения у меня не сработали.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102754</commentid>
    <comment_count>1</comment_count>
    <who name="real@altlinux.org">real.altlinux.org</who>
    <bug_when>2009-11-06 15:50:14 +0300</bug_when>
    <thetext>По второй ссылке импорт исправился. Выходит, ошибка какая-то другая выбрасывается?

Не могли бы Вы приложить этот prod.ini?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102841</commentid>
    <comment_count>2</comment_count>
    <who name="Vladimir V. Kamarzin">vvk</who>
    <bug_when>2009-11-09 09:40:38 +0300</bug_when>
    <thetext>Вот оригинальный http://orphereus.googlecode.com/svn/trunk/development.ini.template</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102842</commentid>
    <comment_count>3</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2009-11-09 10:13:42 +0300</bug_when>
    <thetext>python-module-pylons-1.0-alt1.hg20090814.1 -&gt; sisyphus:

* Mon Nov 09 2009 Eugeny A. Rostovtsev (REAL) &lt;real at altlinux&gt; 1.0-alt1.hg20090814.1

- Fixed imports (ALT #22195)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102861</commentid>
    <comment_count>4</comment_count>
    <who name="Vladimir V. Kamarzin">vvk</who>
    <bug_when>2009-11-09 17:28:41 +0300</bug_when>
    <thetext>Хм, а у меня так и не починилось
python-module-pylons-1.0-alt1.hg20090814.1

# paster setup-app prod.ini
Traceback (most recent call last):
  File &quot;/usr/bin/paster&quot;, line 8, in &lt;module&gt;
    load_entry_point(&apos;PasteScript==1.7.4dev&apos;, &apos;console_scripts&apos;, &apos;paster&apos;)()
  File &quot;/usr/lib/python2.5/site-packages/paste/script/command.py&quot;, line 100, in run
    invoke(command, command_name, options, args[1:])
  File &quot;/usr/lib/python2.5/site-packages/paste/script/command.py&quot;, line 139, in invoke
    exit_code = runner.run(args)
  File &quot;/usr/lib/python2.5/site-packages/paste/script/appinstall.py&quot;, line 68, in run
    return super(AbstractInstallCommand, self).run(new_args)
  File &quot;/usr/lib/python2.5/site-packages/paste/script/command.py&quot;, line 234, in run
    result = self.command()
  File &quot;/usr/lib/python2.5/site-packages/paste/script/appinstall.py&quot;, line 447, in command
    conf = appconfig(config_spec, relative_to=os.getcwd())
  File &quot;/usr/lib/python2.5/site-packages/paste/deploy/loadwsgi.py&quot;, line 214, in appconfig
    global_conf=global_conf)
  File &quot;/usr/lib/python2.5/site-packages/paste/deploy/loadwsgi.py&quot;, line 247, in loadcontext
    global_conf=global_conf)
  File &quot;/usr/lib/python2.5/site-packages/paste/deploy/loadwsgi.py&quot;, line 270, in _loadconfig
    return loader.get_context(object_type, name, global_conf)
  File &quot;/usr/lib/python2.5/site-packages/paste/deploy/loadwsgi.py&quot;, line 401, in get_context
    section)
  File &quot;/usr/lib/python2.5/site-packages/paste/deploy/loadwsgi.py&quot;, line 423, in _context_from_use
    object_type, name=use, global_conf=global_conf)
  File &quot;/usr/lib/python2.5/site-packages/paste/deploy/loadwsgi.py&quot;, line 353, in get_context
    global_conf=global_conf)
  File &quot;/usr/lib/python2.5/site-packages/paste/deploy/loadwsgi.py&quot;, line 247, in loadcontext
    global_conf=global_conf)
  File &quot;/usr/lib/python2.5/site-packages/paste/deploy/loadwsgi.py&quot;, line 277, in _loadegg
    return loader.get_context(object_type, name, global_conf)
  File &quot;/usr/lib/python2.5/site-packages/paste/deploy/loadwsgi.py&quot;, line 553, in get_context
    object_type, name=name)
  File &quot;/usr/lib/python2.5/site-packages/paste/deploy/loadwsgi.py&quot;, line 579, in find_egg_entry_point
    possible.append((entry.load(), protocol, entry.name))
  File &quot;/usr/lib/python2.5/site-packages/pkg_resources.py&quot;, line 1913, in load
    entry = __import__(self.module_name, globals(),globals(), [&apos;__name__&apos;])
  File &quot;/usr/lib/python2.5/site-packages/Orphereus/config/middleware.py&quot;, line 42, in &lt;module&gt;
    from Orphereus.config.environment import load_environment
  File &quot;/usr/lib/python2.5/site-packages/Orphereus/config/environment.py&quot;, line 30, in &lt;module&gt;
    import Orphereus.lib.helpers
  File &quot;/usr/lib/python2.5/site-packages/Orphereus/lib/helpers.py&quot;, line 28, in &lt;module&gt;
    from pylons import config, request, c, g
ImportError: cannot import name c</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102872</commentid>
    <comment_count>5</comment_count>
    <who name="real@altlinux.org">real.altlinux.org</who>
    <bug_when>2009-11-09 20:36:08 +0300</bug_when>
    <thetext>Прошу прощения, не сразу обратил внимание на разницу между вышеприведённой ошибкой и той, что исправляется по Вашей второй ссылке. Последние 3 строки - это не pylons, это Ваш Orphereus. Вот что в строке 28:

from pylons import config, request, c, g

А вот в pylons, PasteScript и PasteDeploy таких строк вообще нет.

Короче, нужно чинить Orphereus.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102874</commentid>
    <comment_count>6</comment_count>
    <who name="real@altlinux.org">real.altlinux.org</who>
    <bug_when>2009-11-09 21:52:53 +0300</bug_when>
    <thetext>Хотя... можно просто добавить эти два объекта (c &amp; g) в сам pylons.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102876</commentid>
    <comment_count>7</comment_count>
    <who name="real@altlinux.org">real.altlinux.org</who>
    <bug_when>2009-11-09 22:30:54 +0300</bug_when>
    <thetext>#15561 DONE sisyphus python-module-pylons.git=1.0-alt1.hg20090814.2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102899</commentid>
    <comment_count>8</comment_count>
    <who name="Vladimir V. Kamarzin">vvk</who>
    <bug_when>2009-11-10 15:35:37 +0300</bug_when>
    <thetext>tnx, заработало</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>