<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/dbfpy/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/dbfpy/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/dbfpy/bugs/</id><updated>2015-08-09T08:52:43.225000Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>#17 Add support for the extended fields</title><link href="https://sourceforge.net/p/dbfpy/bugs/17/?limit=25#09e9" rel="alternate"/><published>2015-08-09T08:52:43.225000Z</published><updated>2015-08-09T08:52:43.225000Z</updated><author><name>Alexey Kolyanov</name><uri>https://sourceforge.net/u/akolyanov/</uri></author><id>https://sourceforge.net573ab37f92e3968355cc25895753d96956cc3f25</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I cannot, sorry. It was the file of my client.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#17 Add support for the extended fields</title><link href="https://sourceforge.net/p/dbfpy/bugs/17/?limit=25#0aff" rel="alternate"/><published>2015-08-09T04:01:39.240000Z</published><updated>2015-08-09T04:01:39.240000Z</updated><author><name>alexander smishlajev</name><uri>https://sourceforge.net/u/a1s/</uri></author><id>https://sourceforge.netcdee5df943c6260d42f1b4160446ac405b6893ec</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Please, can you provide an example data file?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#10 Method isDeleted on linux</title><link href="https://sourceforge.net/p/dbfpy/bugs/10/?limit=25#9261" rel="alternate"/><published>2015-08-09T03:43:15.235000Z</published><updated>2015-08-09T03:43:15.235000Z</updated><author><name>alexander smishlajev</name><uri>https://sourceforge.net/u/a1s/</uri></author><id>https://sourceforge.net499425c6a3155cabd7045c826be8215a84a86f0e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; closed-invalid&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Group&lt;/strong&gt;:  --&amp;gt; -&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>#19 Error when trying to access dbf file entries</title><link href="https://sourceforge.net/p/dbfpy/bugs/19/?limit=25#e6ba" rel="alternate"/><published>2015-08-09T03:39:31.101000Z</published><updated>2015-08-09T03:39:31.101000Z</updated><author><name>alexander smishlajev</name><uri>https://sourceforge.net/u/a1s/</uri></author><id>https://sourceforge.net5082f45c7417289b6c63877b41d25477a6398aea</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: pending --&amp;gt; closed&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>#17 Add support for the extended fields</title><link href="https://sourceforge.net/p/dbfpy/bugs/17/?limit=25#fa05" rel="alternate"/><published>2015-07-08T11:40:47.249000Z</published><updated>2015-07-08T11:40:47.249000Z</updated><author><name>Alexey Kolyanov</name><uri>https://sourceforge.net/u/akolyanov/</uri></author><id>https://sourceforge.net82f1bb2c42df71a6f80b5c5418cb92be478edb27</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;As I remember it helped me to work with this by adding 2 classes as workaround. File 'fields.py':&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;DbfVarCharacterFieldDef&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DbfFieldDef&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="sd"&gt;"""Definition of the character field."""&lt;/span&gt;

    &lt;span class="n"&gt;typeCode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"V"&lt;/span&gt;
    &lt;span class="n"&gt;defaultValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;decodeValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="sd"&gt;"""Return string object.&lt;/span&gt;

&lt;span class="sd"&gt;        Return value is a ``value`` argument with stripped right spaces.&lt;/span&gt;

&lt;span class="sd"&gt;        """&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;  &lt;span class="c"&gt;# .rstrip(" ")&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;encodeValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="sd"&gt;"""Return raw data string encoded from a ``value``."""&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)[:&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ljust&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;DbfCharacterNameFieldDef&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DbfFieldDef&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="sd"&gt;"""Definition of the character field."""&lt;/span&gt;

    &lt;span class="n"&gt;typeCode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"0"&lt;/span&gt;
    &lt;span class="n"&gt;defaultValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;decodeValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="sd"&gt;"""Return string object.&lt;/span&gt;

&lt;span class="sd"&gt;        Return value is a ``value`` argument with stripped right spaces.&lt;/span&gt;

&lt;span class="sd"&gt;        """&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rstrip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;" "&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;encodeValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="sd"&gt;"""Return raw data string encoded from a ``value``."""&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)[:&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ljust&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;</summary></entry><entry><title>#17 Add support for the extended fields</title><link href="https://sourceforge.net/p/dbfpy/bugs/17/?limit=25#51bf" rel="alternate"/><published>2015-07-08T07:17:20.072000Z</published><updated>2015-07-08T07:17:20.072000Z</updated><author><name>George</name><uri>https://sourceforge.net/u/georgeukrr/</uri></author><id>https://sourceforge.net545442bb2c3214375d5773d4613b659ddee7015b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Am I right in thinking this is the cause of the error...&lt;/p&gt;
&lt;p&gt;Traceback (most recent call last):&lt;br /&gt;
  File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File "c:\python27\lib\site-packages\dbfpy\dbf.py", line 138, in &lt;strong&gt;init&lt;/strong&gt;&lt;br /&gt;
    self.header = self.HeaderClass.fromStream(self.stream)&lt;br /&gt;
  File "c:\python27\lib\site-packages\dbfpy\header.py", line 128, in fromStream&lt;br /&gt;
    _fld = fields.lookupFor(_data&lt;span&gt;[11]&lt;/span&gt;).fromString(_data, _pos)&lt;br /&gt;
  File "c:\python27\lib\site-packages\dbfpy\fields.py", line 473, in lookupFor&lt;br /&gt;
    return _fieldsRegistry&lt;span&gt;[typeCode]&lt;/span&gt;&lt;br /&gt;
KeyError: '0'&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#19 Error when trying to access dbf file entries</title><link href="https://sourceforge.net/p/dbfpy/bugs/19/?limit=25#e552" rel="alternate"/><published>2015-06-05T09:11:14.145000Z</published><updated>2015-06-05T09:11:14.145000Z</updated><author><name>Thomas Frei</name><uri>https://sourceforge.net/u/thofrei/</uri></author><id>https://sourceforge.nete0f89bba6463a495b1ec97550277818b63c439e3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Actually it was enough to just add ignoreError to the Dbf construction. Thank you!&lt;/p&gt;
&lt;p&gt;Solution:&lt;br /&gt;
from dbfpy import dbf&lt;br /&gt;
db=dbf.Dbf("Belgium_Pipelines.dbf", ignoreErrors=True)&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#19 Error when trying to access dbf file entries</title><link href="https://sourceforge.net/p/dbfpy/bugs/19/?limit=25#9976/25d9" rel="alternate"/><published>2015-06-05T05:16:59.206000Z</published><updated>2015-06-05T05:16:59.206000Z</updated><author><name>alexander smishlajev</name><uri>https://sourceforge.net/u/a1s/</uri></author><id>https://sourceforge.netf83ee866fbc9a39f1f022fb697c7b61b54215590</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Alexander&lt;/p&gt;
&lt;p&gt;Thank you for your answer. So what do I have to change to make it work? I don't understand why I get this error when calling the rows... I mean I am not writig anything in the fields yet at this part of de code. I just try to iterate over them&lt;/p&gt;
&lt;p&gt;-------- Ursprüngliche Nachricht --------&lt;br /&gt;
Von: alexander smishlajev &lt;a href="mailto:a1s@users.sf.net"&gt;a1s@users.sf.net&lt;/a&gt;&lt;br /&gt;
Datum: 05.06.2015 05:29 (GMT+01:00)&lt;br /&gt;
An: "&lt;span&gt;[dbfpy:bugs]&lt;/span&gt;" &lt;a href="mailto:19@bugs.dbfpy.p.re.sf.net"&gt;19@bugs.dbfpy.p.re.sf.net&lt;/a&gt;&lt;br /&gt;
Betreff: &lt;span&gt;[dbfpy:bugs]&lt;/span&gt; #19 Error when trying to access dbf file entries&lt;/p&gt;
&lt;p&gt;That is DBF notion of Numeric Overflow. A value that was put in that field is bigger than field width would allow.&lt;/p&gt;
&lt;p&gt;You may pass ignoreErrors=True to your Dbf() constructor, and then you should get Dbf.INVALID_VALUE instead of exception.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;a class="alink" href="/p/dbfpy/bugs/19"&gt;[bugs:#19]&lt;/a&gt;&lt;a href="http://sourceforge.net/p/dbfpy/bugs/19"&gt;http://sourceforge.net/p/dbfpy/bugs/19&lt;/a&gt; Error when trying to access dbf file entries&lt;/p&gt;
&lt;p&gt;Status: open&lt;br /&gt;
Group: -&lt;br /&gt;
Created: Thu Jun 04, 2015 06:47 PM UTC by Thomas Frei&lt;br /&gt;
Last Updated: Thu Jun 04, 2015 06:47 PM UTC&lt;br /&gt;
Owner: nobody&lt;/p&gt;
&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I'm trying to use dbfpy to change the entries of an existing dbf file (see attachment). For this I'd like to read out the columns of the file, edit them and write them back into the file. Unfortunately, when I try to access the entries I always get an error: "ValueError: invalid literal for int() with base 10: '****' "&lt;/p&gt;
&lt;p&gt;I'm doing the following:&lt;br /&gt;
from dbfpy import dbf db=dbf.Dbf("Belgium_Pipelines.dbf", readOnly=False, new=False)&lt;br /&gt;
Line_Name=db&lt;span&gt;[1]&lt;/span&gt;&lt;br /&gt;
Flow_Direction=db&lt;span&gt;[5]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Why isn't that working? I also tried to set up an iterator with: for rec in db, but I get the same error.&lt;/p&gt;
&lt;p&gt;Thank you for your help&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Sent from sourceforge.net because you indicated interest in &lt;a href="https://sourceforge.net/p/dbfpy/bugs/19"&gt;https://sourceforge.net/p/dbfpy/bugs/19/&lt;/a&gt;&lt;a href="https://sourceforge.net/p/dbfpy/bugs/19"&gt;https://sourceforge.net/p/dbfpy/bugs/19&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To unsubscribe from further messages, please visit &lt;a href="https://sourceforge.net/auth/subscriptions"&gt;https://sourceforge.net/auth/subscriptions/&lt;/a&gt;&lt;a href="https://sourceforge.net/auth/subscriptions"&gt;https://sourceforge.net/auth/subscriptions&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#19 Error when trying to access dbf file entries</title><link href="https://sourceforge.net/p/dbfpy/bugs/19/?limit=25#2273" rel="alternate"/><published>2015-06-05T03:29:54.626000Z</published><updated>2015-06-05T03:29:54.626000Z</updated><author><name>alexander smishlajev</name><uri>https://sourceforge.net/u/a1s/</uri></author><id>https://sourceforge.netf2437f7417ac7ffe52d54275b674af2e6e71c9a3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; pending&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>#19 Error when trying to access dbf file entries</title><link href="https://sourceforge.net/p/dbfpy/bugs/19/?limit=25#9976" rel="alternate"/><published>2015-06-05T03:29:21.044000Z</published><updated>2015-06-05T03:29:21.044000Z</updated><author><name>alexander smishlajev</name><uri>https://sourceforge.net/u/a1s/</uri></author><id>https://sourceforge.net6d4e7b2ecff30ba53904375a0223c062d018ed9c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;That is DBF notion of Numeric Overflow.  A value that was put in that field is bigger than field width would allow.&lt;/p&gt;
&lt;p&gt;You may pass ignoreErrors=True to your Dbf() constructor, and then you should get Dbf.INVALID_VALUE instead of exception.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>