Re: find-work script no longer working on stable

2016-08-09 Thread Guido Günther
On Tue, Aug 09, 2016 at 06:50:47PM +0100, Chris Lamb wrote:
> > try:
> > import requests
> > except ImportError:
> > sys.stderr.puts("You need to install python3-requests")
> > sys.exit(1)
> 
> This seems unnecessary; ``requests`` was always required, it would make
> the behaviour inconsistent with all the other scripts which also have

It's also inconsistent to have some using Python2 and others Python3 so
what?

> dependencies that are in other packages, its Debian-specific, and
> aesthetically unpleasing to do this.

Aesthetically unpleasing is that we have requirements in documentation
instead of having the software tell us right away but I won't push this.

> 
> Besides, more idiomatic is
> 
> print("You need to install python3-requests", file=sys.stderr)
> 

sys.stderr.puts has the same syntax in python2 and python3 out of the
box while print doesn't.
Cheers,
 -- Guido



Re: find-work script no longer working on stable

2016-08-09 Thread Guido Günther
On Tue, Aug 09, 2016 at 01:13:23PM +0200, Ola Lundqvist wrote:
> Hi Chris
> 
> After fiddling with this for a while I realize that there is a
> python-requests package but there is also a phyton3-requests package.
> After installing that it works just fine.
> 
> I have now committed a change documenting this requirement at the top
> of the script.

Since it is required we could do a:

try:
import requests
except ImportError:
sys.stderr.puts("You need to install python3-requests")
sys.exit(1)



Re: find-work script no longer working on stable

2016-08-09 Thread Julien Cristau
On Tue, Aug  9, 2016 at 13:37:44 +0200, Ola Lundqvist wrote:

> Hi chris
> 
> I pasted all traceback I had. :)

No you didn't, you excluded the most important part:
ImportError: No module named 'requests'

Cheers,
Julien



Re: find-work script no longer working on stable

2016-08-09 Thread Chris Lamb
> He did post the entire traceback.

Nope, or at least not in my MTA.. http://i.imgur.com/VD7Xmpb.jpg

*shrugs*


-- 
Chris Lamb
chris-lamb.co.uk / @lolamby



Re: find-work script no longer working on stable

2016-08-09 Thread Chris Lamb
> I pasted all traceback I had. :)

That's .. very odd. You should have seen (at least!) "ImportError:
No module named requests" which would have pointed out the problem
quite quickly.

(I was also confused that you pointed to a commit about encoding
issues, rather than one moving to Python 3..)

Anyway, glad it's working for you now.


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Re: find-work script no longer working on stable

2016-08-09 Thread Ola Lundqvist
Hi chris

I pasted all traceback I had. :)
If you know a way to get more then please let me know.

/ Ola

Sent from a phone

Den 9 aug 2016 13:23 skrev "Chris Lamb" :

> > After fiddling with this for a while I realize that there is a
> > python-requests package but there is also a phyton3-requests package.
>
> Oh, that simple? That should have been pretty obvious if you had pasted
> the traceback..
>
> Anyway, I'm glad I could fix the locale issue for myself.
>
>
> Regards,
>
> --
>   ,''`.
>  : :'  : Chris Lamb
>  `. `'`  la...@debian.org / chris-lamb.co.uk
>`-
>


Re: find-work script no longer working on stable

2016-08-09 Thread Roberto C . Sánchez
He did post the entire traceback.  Without python3-requests, this is all
that happens:

Traceback (most recent call last):
  File "./find-work", line 7, in 
import requests
ImportError: No module named 'requests'

That is the entirety of it; there is nothing more.

In any event, I am happy that Ola has figured this out and documented
it, as the script now works again for me with the proper dependencies
installed.

Regards,

-Roberto

On Tue, Aug 09, 2016 at 12:22:46PM +0100, Chris Lamb wrote:
> > After fiddling with this for a while I realize that there is a
> > python-requests package but there is also a phyton3-requests package.
> 
> Oh, that simple? That should have been pretty obvious if you had pasted
> the traceback..
> 
> Anyway, I'm glad I could fix the locale issue for myself.
> 
> 
> Regards,
> 
> -- 
>   ,''`.
>  : :'  : Chris Lamb
>  `. `'`  la...@debian.org / chris-lamb.co.uk
>`-
> 

-- 
Roberto C. Sánchez
http://people.connexer.com/~roberto
http://www.connexer.com


signature.asc
Description: Digital signature


Re: find-work script no longer working on stable

2016-08-09 Thread Chris Lamb
> After fiddling with this for a while I realize that there is a
> python-requests package but there is also a phyton3-requests package.

Oh, that simple? That should have been pretty obvious if you had pasted
the traceback..

Anyway, I'm glad I could fix the locale issue for myself.


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Re: find-work script no longer working on stable

2016-08-08 Thread Chris Lamb
> ola@tigereye:~/git/debian-lts$ ./find-work
> Traceback (most recent call last):
>   File "./find-work", line 3, in 
> import requests
> 

I think I'm missing some bit of your traceback/testcase here?

> 8056874b90d35883fd3a1747b911d935367edda3

Guessing from this, I think you had locale issues. This is orthogonal
to stable/unstable but rather an invalid/missing/whatever LANG setting.

For example, under sid if I unset LANG:

$ LANG= ./find-work
[..]
  File "./find-work", line 66, in 
dla_needed[package]['more'],
UnicodeEncodeError: 'ascii' codec can't encode character '\xe1' in position 13: 
ordinal not in range(128)

> Or can we in some other way make it work also on Debian stable?

I've fixed the above issue in 19dab98. No need to jump to reverting
stuff..


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-