0

New to python, used Matlab previously.

I get an error message: "The debugger backend could not be started." when I try to run any script in Eric IDE editor for python. (I am using various simple code examples for importing and visualizing data. An example of borrowed code is below.)

I installed python 3.6, and Python 3.5 (should I uninstall one of these?) I downloaded Eric to use as an editor and debugger and installed as an administrator.

In the Eric Python documentation I did not find a solution. I did look in preferences for debugging and tried both the path for Python 3.5 as well as Python 3.6 I am not sure what I changed or broke as a script had worked from the "shell" tab in Eric previously. So I broke something and cannot fix it.

Should I try uninstalling Eric, and both versions of Python (3.5 and 3.6) and starting over from scratch?

I think my issue may have something to do with paths, file locations etc., installation directories, really not sure and cannot find anything helpful online after much searching.

I also am not certain know what paths (full directory filenames) should be in "Interpreter:" and "Working directory:" in the "Run Script" window.

Any help much appreciated! Thanks in advance.

Rebecca

# Numpy (data import, manipulation, export)
import numpy as np
# Matplotlib (create trends)
import matplotlib.pyplot as plt

# load the data file
data_file = np.genfromtxt('data_file.txt', delimiter=',')

# create time vector from imported data (starts from index 0)
time = data_file[:,0]
# parse good sensor data from imported data
sensors = data_file[:,1:5]

# display the first 6 sensor rows
print(sensors[0:6])

# adjust time to start at zero by subtracting the
#  first element in the time vector (index = 0)
time = time - time[0]

# calculate the average of the sensor readings
avg = np.mean(sensors,1) # over the 2nd dimension

# export data
# stack time and avg as column vectors
my_data = np.vstack((time,sensors.T,avg))
# transpose data
my_data = my_data.T
# save text file with comma delimiter
np.savetxt('export_from_python.txt',my_data,delimiter=',')

# generate a figure
plt.figure(1)
plt.plot(time/60.0,sensors[:,1],'ro')
plt.plot(time/60.0,avg,'b.')
# add text labels to the plot
plt.legend(['Sensor 2','Average Sensors 1-4'])
plt.xlabel('Time (min)')
plt.ylabel('Sensor Values')
# save the figure as a PNG file
plt.savefig('my_Python_plot.png')
# show the figure on the screen (pauses execution until closed)
plt.show()
anothernode
  • 5,100
  • 13
  • 43
  • 62
Rebecca Ijekah
  • 429
  • 2
  • 5
  • 14
  • I found this in the manual, and re-set my confirguration. Reset User Configuration If desired, Eric “First time usage” condition can be reset simply erasing the “*.ini” files you'll fine inside167 your \AppData\Roaming\Eric6 “hidden” directory168; next Eric run will thus execute as it were the first.- – Rebecca Ijekah Jun 13 '18 at 20:29

1 Answers1

0
  1. I re-set my configuration by deleting .ini files. (From Eric6 documentation)"Reset User Configuration. If desired, Eric “First time usage” condition can be reset simply erasing the “.ini” files you'll find inside your \AppData\Roaming\Eric6 “hidden” directory; next Eric run will thus execute as it were the first.-"
  2. Then I followed the very helpful instructions on this page (http://techattitude.com/tips-tricks-and-hacks/how-to-install-eric6-ide-for-python-on-windows/) a second time, by resetting the following:
  3. In eric6: settings, preferences, autocompletion, Qsintilla. Selected "from document and API files"
  4. In eric6: settings, preferences, editor, APIs: Language, Python3, made sure Python-3.5.api was listed under APIs.
  5. I clicked on "compile APIs. For both Python3 language dropdown and repeated the same for QScintilla.

No longer getting the error message that the debugger is not starting! ;) Updating this post in case this answer helps someone else. I think the problem was a result of not knowing what's installed where, what's in the path and/or working directory location, and/or python and Qsintilla version. Not 100% sure. A possible result of not being sure which items were installed in which directories when I installed various things (Python, Eric etc.) and maybe not checking off "add to path" during an installation of python or a module.

Rebecca Ijekah
  • 429
  • 2
  • 5
  • 14