[Eric] doctest.py problem on eric5

Algis Kabaila akabaila at pcug.org.au
Wed Aug 17 15:34:43 BST 2011


On Wednesday 17 August 2011 01:11:15 Detlev Offenbach wrote:
> On Dienstag, 16. August 2011, Algis Kabaila wrote:
> > On Tuesday 16 August 2011 03:17:57 Detlev Offenbach wrote:
> > > On Samstag, 13. August 2011, Algis Kabaila wrote:
> > > > Hi,
> > > > 
> > > > I've just installed a stable eric5-5.1.4 (rev 70d7137b615c). When
> > > > testing upgrade of a pypi package, an old problem arouse: on eric
> > > > testing a program with doctest.py causes problems that do not occur
> > > > when staring the same test program from the CLI. The test program
> > > > runs without complaints from CLI as shown below.
> > > > 
> > > > ak at supremo:/dat/work/py3/vectors32$ python3
> > > > vectors32-tst/testVectors32.py vectors32 module verification:
> > > > If no errors reported, all is well.
> > > > ak at supremo:/dat/work/py3/vectors32$
> > > > 
> > > > The module tested is vectors32 and is installed on my system.  When
> > > > running the same program on eric5, an exception is raised by the
> > > > debugger:
> > > > 
> > > > The debugger program raised an exception
> > > > Attribute Error
> > > > "'Async File' object has no attribute 'encoding'"
> > > > File /usr/lib/python3.2/doctest.py
> > > > Line 1361
> > > > 
> > > > I attach a tar ball of the module, which can be used to install the
> > > > module in the standard location
> > > > 
> > > > ak at supremo:/dat/work/py3/vectors32$ ls
> > > > /usr/local/lib/python3.2/dist-packages/ vectors32
> > > > vectors32-0.0.5.egg-info
> > > > ak at supremo:/dat/work/py3/vectors32$
> > > > 
> > > > The error is raised consistently. While this is not a big deal in the
> > > > otherwise excellent program, I thought it would be good to eliminate
> > > > it.
> > > > 
> > > > Of couse, there is  a good chance that  my configuration is faulty. 
> > > > If that is the case, can you help me to configure eric5 better?
> > > > 
> > > > Regards,
> > > > 
> > > > OldAl.
> > > 
> > > Hi Al,
> > > 
> > > the eric debugger backend uses a file like wrapper for the network
> > > sockets. It seems I have to implement some more attributes and methods.
> > > I'll look into these within the next days.
> > > 
> > > Regards,
> > > Detlev
> > 
> > Hi Detlev,
> > 
> > No hurry for me - the work around is OK - not great, but ok.  Just that
> > it would be better if eric5 did not issue unwarranted warnings.
> > 
> > Al.
> > _______________________________________________
> > Eric mailing list
> > Eric at riverbankcomputing.com
> > http://www.riverbankcomputing.com/mailman/listinfo/eric
> 
> Hi Al,
> 
> I just updated the source repo. Please get a copy of the sources and give
> it a try on your system.
> 
> Regards,
> Detlev

Hi Detlev,

Thank you for the prompt effort! Unfortunately, I can not see anything 
different, but before I go any further, I installed the latest version, but did 
not first uninstall.  Should I uninstall first?
                                 ^^^^^^^^^^^^^^^^^^

So, on CLI the dialog is:

ak at supremo:/dat/work/py3/vectors32/vectors32-tst$ python3 testVectors32.py 
vectors32 module verification:
If no errors reported, all is well.
ak at supremo:/dat/work/py3/vectors32/vectors32-tst$ 

When the testVectors32.py is opened in eric5, the debugger opens doctest.py on 
line 1361, which is

encoding = save_stdout.encoding

and the error message is 

'Async File' object has no attribute 'encoding'
File /var/lib/python3.2/doctest.py line 1361

The vectors32 module is on the pypi index - it is not big, with IMO decent 
documentation, though I am biased - I wrote it.  You are more than welcom to 
try it.  If you wish, I could send you the tar ball, though pypi I think is 
easier.

Kind regards,

Al.


More information about the Eric mailing list