Re: [python-tulip] '"global name \'s\' is not defined"' : any suggestions or hints?

2014-09-29 Thread Marco Ippolito
Hi Yuri,
thanks for your suggestion.

I've already discovered the same bug, which in turn helped to revealed
some other problems.
But I do not want to overburder you and other people with these issues.
(actually since I've been told to post my issue here, I didn't know
and I didn't think this list is about only development of asyncio)

Thank you again for your kind support.
Kind regards.
Marco

2014-09-29 20:55 GMT+02:00 Yury Selivanov :
> Marco,
>
> The problem is on the line number 82 of your script:
>
>yield From(s.get( ... ))
>
> where 's' is undefined. Tracing was easy when I added the following code
>
>import traceback
>print(traceback.format_exc())
>
> before your "print('...', url, 'has error', repr(str(exc)))"
>
> Now, this list is about development of asyncio. For bug reports use the
> issue tracker, and for general python questions or help I suggest you to
> google python-list and post there.
>
> Thanks,
>
>
>
> On 2014-09-29, 9:46 AM, Marco Ippolito wrote:
>>
>> Hi all,
>>
>> I thought it was something related to some "global pattern", a "regex", to
>> configure within Trollius.
>> But Victor Stinner (Trollius) told me it's not a Trollius matter, and
>> suggested me to ask here for some advice.
>>
>> I attached the file which, when run, produces the following output:
>>
>> time ./crawl_requests.py
>> http://www.ilsole24ore.com/english-version/front-page.shtml?refresh_ce
>> DEBUG:trollius:Using selector: EpollSelector ('url to do = ', '
>> http://www.ilsole24ore.com/english-version/front-page.shtml?refresh_ce')
>> ('processing:', '
>> http://www.ilsole24ore.com/english-version/front-page.shtml?refresh_ce')
>> ('...', '
>> http://www.ilsole24ore.com/english-version/front-page.shtml?refresh_ce',
>> 'has error', '"global name \'s\' is not defined"') ('done:', 1, '; ok:',
>> 0)
>>
>> Can you please give me some hints?
>>
>> Looking forward to your kind help. Kind regards. Marco
>>
>


Re: [python-tulip] '"global name \'s\' is not defined"' : any suggestions or hints?

2014-09-29 Thread Yury Selivanov

Marco,

The problem is on the line number 82 of your script:

   yield From(s.get( ... ))

where 's' is undefined. Tracing was easy when I added the following code

   import traceback
   print(traceback.format_exc())

before your "print('...', url, 'has error', repr(str(exc)))"

Now, this list is about development of asyncio. For bug reports use the 
issue tracker, and for general python questions or help I suggest you to 
google python-list and post there.


Thanks,


On 2014-09-29, 9:46 AM, Marco Ippolito wrote:

Hi all,

I thought it was something related to some "global pattern", a "regex", to
configure within Trollius.
But Victor Stinner (Trollius) told me it's not a Trollius matter, and
suggested me to ask here for some advice.

I attached the file which, when run, produces the following output:

time ./crawl_requests.py
http://www.ilsole24ore.com/english-version/front-page.shtml?refresh_ce
DEBUG:trollius:Using selector: EpollSelector ('url to do = ', '
http://www.ilsole24ore.com/english-version/front-page.shtml?refresh_ce')
('processing:', '
http://www.ilsole24ore.com/english-version/front-page.shtml?refresh_ce')
('...', '
http://www.ilsole24ore.com/english-version/front-page.shtml?refresh_ce',
'has error', '"global name \'s\' is not defined"') ('done:', 1, '; ok:', 0)

Can you please give me some hints?

Looking forward to your kind help. Kind regards. Marco