Python Forum

Full Version: how to get started with Eric from the very beginning
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
fairly new to python

opened a file - then eric (an ide that i have installed') opened the code.

then the following messages popped up;:


Es ist kein Provider für Code Dokumentation registriert. Diese Funktion wurde deaktiviert.


wähle einen listeneintrag um die Konfigurationsseiteite zu sehen



Warning: translation file 'git_de_DE' could not be loaded. Using default.


what to do?
hello see my approach


if i do like so - in eric

1
Python 3.7.1 (default, Oct 22 2018, 10:41:28)
2
[GCC 8.2.1 20180831] auf martin-pc, Standard
3
>>> contacts.py
4
>>> Traceback (innermost last):
5
File "<stdin>", line 1, in <module>
6
NameError: name 'contacts' is not defined



i get errors...
contacts.py seems to be a Python module, maybe you wanted to import it?
import contacts
hello dear all - i have found out some issues.


The Python interpreter understands and accepts only Python commands. i was running contacts.py in the interpreter, which is not a Python command. That causes some issues.


i have had to do it the correct way: To run the code of the contacts.py file in Eric, simply open it and select Start > Run Script from the Eric main menu (I’m not using Eric, so this option might be a different one, just look at the main menu of the program for something similar).


From Python documentation:
https://docs.python.org/3/library/except...#NameError
exception NameError
Raised when a local or global name is not found. This applies only to unqualified names. The associated value is an error message that includes the name that could not be found.


now i started in eric the correct way and all goes well now,.
Great, I am glad you got it working right, and thanks for posting back about solution!