Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • Feb 04 16:57
    @goanpeca banned @tolgayilmaz

Hello Guys, please i am having a typeError and finding it hard to pinpoint why the error is being thrown on that line of my code . The code is to part of a function that writes a dataframe table to a word document and i am trying to iterate through my dataframe and attach to a table ....... records =relateddrugs[['drugName','averageRating','usefulTo']]

table = doc.add_table(rows=len(unique_related_drug), cols=3)
hdr_cells = table.rows[0].cells
hdr_cells[0].text = 'drugName'
hdr_cells[1].text = 'averageRating'
hdr_cells[2].text = 'usefulTo'
for i  in range(records.shape[0]):
    row_cells = table.add_row().cells
    row_cells[0].text = records.iloc[i,0]
    row_cells[1].text = records.iloc[i,1] #error is thrown at this line
    row_cells[2].text = records.iloc[i,2]"ese1.docx") and this is the error: File "<ipython-input-210-84479bb55188>", line 1, in <module>
wordcreator('Left Ventricular Dysfunction','Enalapril')

File "<ipython-input-209-faf789a77a2e>", line 86, in wordcreator
row_cells[1].text = records.iloc[i,1]

File "C:\Users\Precious\Anaconda3\lib\site-packages\docx\", line 270, in text
r.text = text

File "C:\Users\Precious\Anaconda3\lib\site-packages\docx\oxml\text\", line 104, in text
_RunContentAppender.append_to_run_from_text(self, text)

File "C:\Users\Precious\Anaconda3\lib\site-packages\docx\oxml\text\", line 134, in append_to_run_from_text

File "C:\Users\Precious\Anaconda3\lib\site-packages\docx\oxml\text\", line 141, in add_text
for char in text:

TypeError: 'numpy.float64' object is not iterable

2 replies
Hi, I have installed spyder using anaconda on my mac. I am missing the options in the Tools menu (like preferences and current user environmental variables). What am I missing?
6 replies
Using Spyder in Anaconda. Anaconda states that I'm at version 4.1.3, but inside of Spyder the "about" command returns 4.0.1. How do I troubleshoot the discrepancy?
3 replies

I'm seeing the following error immediately upon launching Spyder from a fresh installation of anaconda:

Traceback (most recent call last):
File "C:\Users\cbaye\anaconda3\lib\site‑packages\IPython\core\", line 362, in init_profile_dir
p = ProfileDir.find_profile_dir_by_name(self.ipython_dir, self.profile, self.config)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\IPython\core\", line 207, in find_profile_dir_by_name
raise ProfileDirError('Profile directory not found in paths: %s' % dirname)
IPython.core.profiledir.ProfileDirError: Profile directory not found in paths: profile_default

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\cbaye\anaconda3\lib\", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\cbaye\anaconda3\lib\", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\spyder_kernels\", line 11, in
File "C:\Users\cbaye\anaconda3\lib\site‑packages\spyder_kernels\console\", line 308, in main
File "", line 2, in initialize
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\config\", line 87, in catch_config_error
return method(app, args, **kwargs)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\ipykernel\", line 545, in initialize
super(IPKernelApp, self).initialize(argv)
File "", line 2, in initialize
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\config\", line 87, in catch_config_error
return method(app,
args, **kwargs)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\IPython\core\", line 458, in initialize
File "C:\Users\cbaye\anaconda3\lib\site‑packages\IPython\core\", line 367, in init_profile_dir
p = ProfileDir.create_profile_dir_by_name(self.ipython_dir, self.profile, self.config)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\IPython\core\", line 179, in create_profile_dir_by_name
return cls(location=profile_dir, config=config)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\config\", line 73, in
super(Configurable, self).
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\", line 1000, in
super_kwargs[key] = value
File "C:\Users\cbaye\anaconda3\lib\", line 119, in
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\", line 1131, in hold_trait_notifications
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\", line 1176, in notify_change
File "C:\Users\cbaye\anaconda3\lib\site‑packages\IPython\core\", line 66, in _location_changed
self.startup_dir = os.path.join(new, self.startup_dir_name)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\", line 585, in
self.set(obj, value)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\", line 574, in set
obj._notify_trait(, old_value, new_value)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\", line 1139, in _notify_trait
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\", line 1176, in notify_change
File "C:\Users\cbaye\anaconda3\lib\site‑packages\IPython\core\", line 120, in check_startup_dir
shutil.copy(src, readme)
File "C:\Users\cbaye\anaconda3\lib\", line 248, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "C:\Users\cbaye\anaconda3\lib\", line 121, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'C:\Users\cbaye\.ipython\profile_default\startup\README'

Any suggestions on how to resolve this error would be appreciated!

3 replies
Spyder crashed and i have uninstalled and installed again again it show spyder crashed
1 reply
Nikolaos Triantafyllis
Hi, I can' install Spyder4 on my Linux Mint 19.3. I see no repo on v4.
4 replies
I have read the messages but still the system is telling me that I haven't read the. How can I stop this?
1 reply
Mathieu Bonneau

Hi there,
I'm running image analysis code with opencv-python. I'm developping in python 3 with spyder4, installed with anaconda. Finally, I'm working on MacOs10.

I have Qt management problem when I use openCV. It seems that 2 set of Qt binaries are loaded into the same process.

I have read a lot of stuff on the net and it seems that it can come from the fact I used brew. But I uninstall it and nothing changed.

1 reply
I'd greatly appreciate some help as I'm trying to fix it since yesterday but can't find anything easy that fix it
spyder crashed during last session
what to do
2 replies
How to disable text suggestion in spyder
1 reply
Simon Savitt
Hi everyone!
Does anyone know if it's possible to delete a code block, so that, for example, in the console:
In [1] blah blah blah mistake
In [2] blah blah blah
I want to delete In [1] without restarting the kernel? Or is this impossible for a good reason?
1 reply
Sorry for the uninformed question :)
You may enter $ clear or >>> clear ; and the prompt return to initial states without using the kernel
hello, im tring to run pexpect.spawn() but I'm getting AttributeError: module 'pexpect' has no attribute 'spawn' any advise?
1 reply
Paul B
I really wish there was a easy way to package my python app with conda in a way the protects the souce code of my app...pyinstaller is giving me runtime errors when I run on a machine that is not my dev box....any ideas?
1 reply
Iftekhar Ahmed
hello i need a help
i removed variable in Spyder. now how to restore it
1 reply
I am having trouble running Jupyter notebooks , I installed the plugin via conda, is there anything else I have to do?
10 replies

very weird ....python 3.8 just downloaded spyder this morning...def parse(dtstr, args, **kwargs):
File "<ipython-input-296-d88bac8fd3e5>", line 1
def parse(dtstr,
args, **kwargs):
SyntaxError: unexpected EOF while parsing

if len(dtstr) == 10 and dtstr.isnumeric():
File "<ipython-input-297-edc831942164>", line 1
if len(dtstr) == 10 and dtstr.isnumeric():
SyntaxError: unexpected EOF while parsing

never mind wrong message...

def parse(dtstr, args, *kwargs):
SyntaxError: unexpected EOF while parsing

if len(dtstr) == 10 and dtstr.isnumeric():
File "<ipython-input-297-edc831942164>", line 1
if len(dtstr) == 10 and dtstr.isnumeric():
SyntaxError: unexpected EOF while parsing

11 replies
this is after I fixed the IBUS permissions issue....
ok, so the spyder site says to use anaconda, but go to the anaconda site and it says to use 'apt get install spyder3'. Howver, that doesn't download the latest spyder3,
33 replies
is this all we have? a real-time chat? no searching for similar questions?
3 replies
Dhivya Bharathi
I am facing problem in working with beautiful soup in Spyder ide
It shows attribute error
2 replies
Hi. What is the best way to be notified of new Spyder releases?
4 replies
Hi, how to install request and BeautifulSoup?
1 reply
i am facing kernel problem
Kernel died, restarting
1 reply
Hi there,
Could you help me run Spyder reports plug-in?
1 reply
Hi, i have used networkx multiple times and just 10 min ago it can't find attributes like 'extended_barabasi_albert_graph'. I haven't changed/downloaded anything. How can I solve this?
1 reply
Akash Tyagi
Where can i enable "Automatic insertion of parentheses, braces and brackets" ?
I am not able to find it in settings. Spyder - 4.1.2
2 replies
Akash Tyagi
Is there any blog/doc available to study spyder Architecture/Design and working ?
Like how components communicate and work ? This can be a useful resource for anyone interested in learning how IDE works.
3 replies

I have Spyder 4.1.3.
I have created a class inherited from Pandas DataFrame but the Variable Explorer says cannot open the variable :
cannot import DrcDataFrame from <my package path file of the class>

My class is:
class DrcDataFrame(pd.DataFrame):

should I overwrite some Pandas methods to let Spyder show my variable?

1 reply
Dr. Muhammad Anjum
hi sir how to ignore negative floating values in a data set ?
1 reply

Hi, I am getting error in Spyder, File "C:\ProgramData\Anaconda3\lib\json\", line 353, in raw_decode
obj, end = self.scan_once(s, idx)

JSONDecodeError: Expecting property name enclosed in double quotes .

1 reply
please help me to resolve the above error
Hi, I am new to SPYDER IDE, I am getting runfile('C:/Users/adamb/AppData/Local/Temp/spyder/PREOS', wdir='C:/Users/adamb/AppData/Local/Temp/spyder', post_mortem=True, current_namespace=True)
1 reply
Is there anyway to restore this file?
Forex doc_Icus
Hello,,i'm new to spider ide and i needed to import a module pandas_datareader but i can't,,any help on how i can ?
1 reply
Manjot Singh
hello, pls guide me. I want to downLoad pyaudio. but i am not ABLE TO
1 reply
Manjot Singh
pls its urgent
Hello, I have installed Anaconnda 1.9.12 on OsX that contains Spyder 4.0.1. I tried to update Spyder to version 4.1.3 in the Terminal typing conda install spyder=4.1.3 but I received this messagge: Collecting package metadata (current_repodata.json): done
Solving environment: done

All requested packages already installed. Why Spyder is not updated to the new version?

1 reply
Hi is there an easy way to comment and un-comment python code in spryder
1 reply