Install problem: (1050, "Table 'tabdocfield' already exists")

Hello,

I'm trying to install erpnext with this script:  https://raw.github.com/webnotes/erpnext/master/install_erpnext.py
on an Ubuntu Server 12.04

I have this error: _mysql_exceptions.OperationalError: (1050, "Table 'tabdocfield' already exists")
I'm a developper but my python knowledge is too light to understand the source code.
Any idea ?
Thanks


Here is the full "log":

--------------------------------------------------------------------------------
Pre-requisites Installed
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Installing ERPNext
--------------------------------------------------------------------------------
ERPNext Database Name: next
conf.py exists
Created user next
Created database next
Granted privileges to user next and database next
Starting database import...
Imported from database lib/webnotes/../conf/Framework.sql
Installing app...
core | doctype | bulk_email
core | doctype | comment
core | doctype | communication
core | doctype | control_panel
core | doctype | custom_field
core | doctype | custom_script
core | doctype | customize_form
core | doctype | customize_form_field
core | doctype | default_home_page
core | doctype | defaultvalue
Traceback (most recent call last):
  File "install_erpnext.py", line 321, in <module>
    install(install_path=install_path)
  File "install_erpnext.py", line 38, in install
    install_erpnext(install_path)
  File "install_erpnext.py", line 181, in install_erpnext
    wnf.install(db_name, root_password=root_password)
  File "lib/wnf.py", line 34, in new_fn
    return fn(*args, **new_kwargs)
  File "lib/wnf.py", line 224, in install
    inst.install(db_name, source_sql=source_sql, verbose=verbose, force=force, admin_password=admin_password)
  File "lib/webnotes/install_lib/install.py", line 88, in install
    self.install_app(verbose=verbose)
  File "lib/webnotes/install_lib/install.py", line 104, in install_app
    sync_for("lib", force=True, sync_everything=True, verbose=verbose)
  File "lib/webnotes/model/sync.py", line 20, in sync_for
    return walk_and_sync(get_path(folder), force, sync_everything, verbose=verbose)
  File "lib/webnotes/model/sync.py", line 45, in walk_and_sync
    if import_file(module_name, doctype, name, force=force) and verbose:
  File "lib/webnotes/modules/import_file.py", line 30, in import_file
    ret = import_file_by_path(path, force)
  File "lib/webnotes/modules/import_file.py", line 51, in import_file_by_path
    import_doclist(doclist)
  File "lib/webnotes/modules/import_file.py", line 101, in import_doclist
    new_bean.insert()
  File "lib/webnotes/model/bean.py", line 260, in insert
    return self.save()
  File "lib/webnotes/model/bean.py", line 304, in save
    self.run_method('on_update')
  File "lib/webnotes/model/bean.py", line 239, in run_method
    getattr(self.controller, method)(*args, **kwargs)
  File "lib/core/doctype/doctype/doctype.py", line 72, in on_update
    updatedb(self.doc.name)
  File "lib/webnotes/model/db_schema.py", line 402, in updatedb
    tab.sync()
  File "lib/webnotes/model/db_schema.py", line 170, in sync
    self.create()
  File "lib/webnotes/model/db_schema.py", line 91, in create
    CHARACTER SET=utf8""" % (self.name, add_text))
  File "lib/webnotes/db.py", line 108, in sql
    self._cursor.execute(query)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1050, "Table 'tabdocfield' already exists")



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Seems you are trying to reinstall on an existing database?

Check if conf.py is created. If yes try:

lib/wnf.py --reinstall -f




On Monday, December 23, 2013 4:26:53 PM UTC+5:30, ta...@gmail.com wrote:
Hello,

I'm trying to install erpnext with this script:  https://raw.github.com/webnotes/erpnext/master/install_erpnext.py
on an Ubuntu Server 12.04

I have this error: _mysql_exceptions.OperationalError: (1050, "Table 'tabdocfield' already exists")
I'm a developper but my python knowledge is too light to understand the source code.
Any idea ?
Thanks


Here is the full "log":

--------------------------------------------------------------------------------
Pre-requisites Installed
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Installing ERPNext
--------------------------------------------------------------------------------
ERPNext Database Name: next
conf.py exists
Created user next
Created database next
Granted privileges to user next and database next
Starting database import...
Imported from database lib/webnotes/../conf/Framework.sql
Installing app...
core | doctype | bulk_email
core | doctype | comment
core | doctype | communication
core | doctype | control_panel
core | doctype | custom_field
core | doctype | custom_script
core | doctype | customize_form
core | doctype | customize_form_field
core | doctype | default_home_page
core | doctype | defaultvalue
Traceback (most recent call last):
  File "install_erpnext.py", line 321, in <module>
    install(install_path=install_path)
  File "install_erpnext.py", line 38, in install
    install_erpnext(install_path)
  File "install_erpnext.py", line 181, in install_erpnext
    wnf.install(db_name, root_password=root_password)
  File "lib/wnf.py", line 34, in new_fn
    return fn(*args, **new_kwargs)
  File "lib/wnf.py", line 224, in install
    inst.install(db_name, source_sql=source_sql, verbose=verbose, force=force, admin_password=admin_password)
  File "lib/webnotes/install_lib/install.py", line 88, in install
    self.install_app(verbose=verbose)
  File "lib/webnotes/install_lib/install.py", line 104, in install_app
    sync_for("lib", force=True, sync_everything=True, verbose=verbose)
  File "lib/webnotes/model/sync.py", line 20, in sync_for
    return walk_and_sync(get_path(folder), force, sync_everything, verbose=verbose)
  File "lib/webnotes/model/sync.py", line 45, in walk_and_sync
    if import_file(module_name, doctype, name, force=force) and verbose:
  File "lib/webnotes/modules/import_file.py", line 30, in import_file
    ret = import_file_by_path(path, force)
  File "lib/webnotes/modules/import_file.py", line 51, in import_file_by_path
    import_doclist(doclist)
  File "lib/webnotes/modules/import_file.py", line 101, in import_doclist
    new_bean.insert()
  File "lib/webnotes/model/bean.py", line 260, in insert
    return self.save()
  File "lib/webnotes/model/bean.py", line 304, in save
    self.run_method('on_update')
  File "lib/webnotes/model/bean.py", line 239, in run_method
    getattr(self.controller, method)(*args, **kwargs)
  File "lib/core/doctype/doctype/doctype.py", line 72, in on_update
    updatedb(self.doc.name)
  File "lib/webnotes/model/db_schema.py", line 402, in updatedb
    tab.sync()
  File "lib/webnotes/model/db_schema.py", line 170, in sync
    self.create()
  File "lib/webnotes/model/db_schema.py", line 91, in create
    CHARACTER SET=utf8""" % (self.name, add_text))
  File "lib/webnotes/db.py", line 108, in sql
    self._cursor.execute(query)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1050, "Table 'tabdocfield' already exists")



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Hello,
thanks for your answer.

I deleted everything (the database and the home folder /home/erpnext/) and retried:

cd /home
sudo su
wget https://raw.github.com/webnotes/erpnext/master/install_erpnext.py
python2.7 install_erpnext.py --create_user


and still the same ...

I have no more ideas.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Are you using the same database?

We are unable to replicate at our end.

If you want to evaluate it, you can use the Virtual Machine

https://www.erpnext.com/erpnext-download

On Sunday, December 29, 2013 4:12:57 AM UTC+5:30, ta...@gmail.com wrote:
Hello,
thanks for your answer.

I deleted everything (the database and the home folder /home/erpnext/) and retried:

cd /home
sudo su
wget https://raw.github.com/webnotes/erpnext/master/install_erpnext.py
python2.7 install_erpnext.py --create_user


and still the same ...

I have no more ideas.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Hello,
I'm certain the database does not exist. I retried today.
Checked before installation: no database.
Some tables are created
Checked after installation failed: Database is created and contains this tables:
- __auth
- tabbulk email
- tabcomment
- tabcommunication
- tabcustom field
- tabcustom script
- tabcustomize form
- tabdefault home page
- tabdefaultvalue
- tabdocfield
- tabdocperm
- tabdoctype
- tabfile data
- tabseries
- tabsessions
- tabsingles

I'm looking for an ERP that I'm able to install by myself so I'm not interested in a Virtual Appliance.
One precision: openerp is installed on the same box ...

Could it be some parameter in mysql ? I'm surprised , there are spaces in table names !
Thanks

Le lundi 30 décembre 2013 11:49:58 UTC+1, rushabh a écrit :
Are you using the same database?

We are unable to replicate at our end.

If you want to evaluate it, you can use the Virtual Machine

https://www.erpnext.com/erpnext-download

On Sunday, December 29, 2013 4:12:57 AM UTC+5:30, ta...@gmail.com wrote:
Hello,
thanks for your answer.

I deleted everything (the database and the home folder /home/erpnext/) and retried:

cd /home
sudo su
wget https://raw.github.com/webnotes/erpnext/master/install_erpnext.py
python2.7 install_erpnext.py --create_user


and still the same ...

I have no more ideas.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
mySql version: mysql  Ver 14.14 Distrib 5.5.34, for debian-linux-gnu (x86_64) using readline 6.2



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.

Hi,

On Tue, Jan 7, 2014 at 8:46 PM, ta...@gmail.com wrote:

Hello,
I’m certain the database does not exist. I retried today.
Checked before installation: no database.
Some tables are created
Checked after installation failed: Database is created and contains this
tables:

  • __auth
  • tabbulk email
  • tabcomment
  • tabcommunication
  • tabcustom field
  • tabcustom script
  • tabcustomize form
  • tabdefault home page
  • tabdefaultvalue
  • tabdocfield
  • tabdocperm
  • tabdoctype
  • tabfile data
  • tabseries
  • tabsessions
  • tabsingles

I’m looking for an ERP that I’m able to install by myself so I’m not
interested in a Virtual Appliance.
One precision: openerp is installed on the same box …

Could it be some parameter in mysql ? I’m surprised , there are spaces in
table names !

The tables you have enumerated are not enough (less in number) and the
conf file is faulty (database name and passwor d is not entered). So,
I suggest run a fresh install.

There are spaces in table names for legacy reasons. You can use
backquote () to escape in queries (eg,tabSerial No`).

Thanks


Pratik
erpnext

Hello, and thankd for answering.
It's not the first time I installed.
Each time, 
- I delete erpnext user and its home.
- I download again th install script
- I drop the database

So in my understanding, it is a fresh install. 

What do you mean by "and the conf file is faulty (database name and password is not entered)" ?

Some tables are created: It means that the installation script can connect to mysql, create the database and (some) tables.

Heidy



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.

On Wed, Jan 8, 2014 at 3:20 PM, Ed Z ta...@gmail.com wrote:

Hello, and thankd for answering.

It’s not the first time I installed.
Each time,

  • I delete erpnext user and its home.
  • I download again th install script
  • I drop the database

So in my understanding, it is a fresh install.

Yes, you are right about that, it is a fresh install if you do this.

What do you mean by “and the conf file is faulty (database name and password
is not entered)” ?

The %(dbname)s what you see should be replaced by the database name
(this part is templated and correct values are automatically injected
during install, did not happen in your case).

Some tables are created: It means that the installation script can connect
to mysql, create the database and (some)
Heidy

Are you following the instructions from here?

Also, we push some changes to the script yesterday. Can you try again?

Thanks,

Pratik
erpnext

Here is the full "log" on an install done this afternoon with the updated script.
Same problem:

us...@ubuntu-box:/home$
sudo apt-get upgrade

us...@ubuntu-box:/home$ sudo apt-get remove python3

us...@ubuntu-box:/home$
sudo su

ro...@ubuntu-box:/home# python -c "import platform; print platform.python_version()"
2.7.3

ro...@ubuntu-box:/home# which python2.7
/usr/bin/python2.7

ro...@ubuntu-box:/home# wget https://raw.github.com/webnotes/erpnext/master/install_erpnext.py
--2014-01-08 14:43:01--  https://raw.github.com/webnotes/erpnext/master/install_erpnext.py
Résolution de raw.github.com (raw.github.com)... 185.31.16.133
Connexion vers raw.github.com (raw.github.com)|185.31.16.133|:443... connecté.
requête HTTP transmise, en attente de la réponse... 200 OK
Longueur: 9838 (9,6K) [text/plain]
Sauvegarde en : «install_erpnext.py»
100%[======================================>] 9 838       --.-K/s   ds 0s
2014-01-08 14:43:01 (85,7 MB/s) - «install_erpnext.py» sauvegardé [9838/9838]

ro...@ubuntu-box:/home# deluser erpnext
Suppression de l'utilisateur « erpnext »...
Attention ! Le groupe « erpnext » ne contient plus aucun membre.
Fait.

ro...@ubuntu-box:/home# rm -r /home/erpnext

ro...@ubuntu-box:/home# python2.7 install_erpnext.py --create_user
Entrez le nouveau mot de passe UNIX : Retapez le nouveau mot de passe UNIX : paswd : le mot de passe a été mis à jour avec succès
Operating System = Linux
Python Version = 2.7.3
Distribution =  ubuntu
--------------------------------------------------------------------------------
Installing Packages: (This may take some time)
python python-setuptools python-dev build-essential python-mysqldb git memcached                                                                                                                                                   ntp vim screen htop
--------------------------------------------------------------------------------
MySQL Root user's Password:
--------------------------------------------------------------------------------
Installing Python Modules: (This may take some time)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Pre-requisites Installed
--------------------------------------------------------------------------------
Cloning erpnext
remote: Reusing existing pack: 96474, done.
remote: Counting objects: 91, done.
remote: Compressing objects: 100% (81/81), done.
remote: Total 96565 (delta 27), reused 34 (delta 8)
Receiving objects: 100% (96565/96565), 28.49 MiB | 5.23 MiB/s, done.
Resolving deltas: 100% (66643/66643), done.
Cloning wnframework
remote: Reusing existing pack: 42596, done.
remote: Counting objects: 122, done.
remote: Compressing objects: 100% (114/114), done.
remote: Total 42718 (delta 41), reused 86 (delta 5)
Receiving objects: 100% (42718/42718), 16.07 MiB | 2.99 MiB/s, done.
Resolving deltas: 100% (28672/28672), done.

--------------------------------------------------------------------------------
Installing ERPNext
--------------------------------------------------------------------------------
ERPNext Database Name: nextdevogram
Created user nextdevogram
Created database nextdevogram
Granted privileges to user nextdevogram and database nextdevogram
Starting database import...
Imported from database lib/webnotes/../conf/Framework.sql
Installing app...
core | doctype | bulk_email
core | doctype | comment
core | doctype | communication
core | doctype | control_panel
core | doctype | custom_field
core | doctype | custom_script
core | doctype | customize_form
core | doctype | customize_form_field
core | doctype | default_home_page
core | doctype | defaultvalue
Traceback (most recent call last):
  File "install_erpnext.py", line 301, in <module>
    install(install_path=install_path)
  File "install_erpnext.py", line 39, in install
    install_erpnext(install_path)
  File "install_erpnext.py", line 181, in install_erpnext
    wnf.install(db_name, root_password=root_password)
  File "lib/wnf.py", line 34, in new_fn
    return fn(*args, **new_kwargs)
  File "lib/wnf.py", line 224, in install
    inst.install(db_name, source_sql=source_sql, verbose=verbose, force=force, admin_password=admin_password)
  File "lib/webnotes/install_lib/install.py", line 88, in install
    self.install_app(verbose=verbose)
  File "lib/webnotes/install_lib/install.py", line 104, in install_app
    sync_for("lib", force=True, sync_everything=True, verbose=verbose)
  File "lib/webnotes/model/sync.py", line 20, in sync_for
    return walk_and_sync(get_path(folder), force, sync_everything, verbose=verbose)
  File "lib/webnotes/model/sync.py", line 45, in walk_and_sync
    if import_file(module_name, doctype, name, force=force) and verbose:
  File "lib/webnotes/modules/import_file.py", line 30, in import_file
    ret = import_file_by_path(path, force)
  File "lib/webnotes/modules/import_file.py", line 51, in import_file_by_path
    import_doclist(doclist)
  File "lib/webnotes/modules/import_file.py", line 101, in import_doclist
    new_bean.insert()
  File "lib/webnotes/model/bean.py", line 260, in insert
    return self.save()
  File "lib/webnotes/model/bean.py", line 304, in save
    self.run_method('on_update')
  File "lib/webnotes/model/bean.py", line 239, in run_method
    getattr(self.controller, method)(*args, **kwargs)
  File "lib/core/doctype/doctype/doctype.py", line 72, in on_update
    updatedb(self.doc.name)
  File "lib/webnotes/model/db_schema.py", line 402, in updatedb
    tab.sync()
  File "lib/webnotes/model/db_schema.py", line 170, in sync
    self.create()
  File "lib/webnotes/model/db_schema.py", line 91, in create
    CHARACTER SET=utf8""" % (self.name, add_text))
  File "lib/webnotes/db.py", line 108, in sql
    self._cursor.execute(query)
  File "/usr/local/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 201, in execute
    self.errorhandler(self, exc, value)
  File "/usr/local/lib/python2.7/dist-packages/MySQLdb/connections.py", line36, 
    in defaulterrorhandler raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1050, "Table 'tabdocfield' already exists")



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Just to let you know.
I didn't solve the problem but i have another ubuntu 12.04 server and on this one the install script is OK.

The main difference between these 2 boxes:

- The first one, on which the install script fails, is a desktop edition (with gnome) so maybe that's the problem ...
- The second one (script OK) is a Ubuntu server 12.04.

Don't lose your time on this topic. As for me, it's sufficient for the moment.

Thanks for your help



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.