by

Where communities thrive


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

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]


doc.save("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\table.py", line 270, in text
r.text = text

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

File "C:\Users\Precious\Anaconda3\lib\site-packages\docx\oxml\text\run.py", line 134, in append_to_run_from_text
appender.add_text(text)

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

TypeError: 'numpy.float64' object is not iterable

2 replies
lil_wombat
@magdakosior
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
srsegal
@srsegal
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
Court
@Courtneybayer__twitter

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\application.py", 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\profiledir.py", 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\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\cbaye\anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\spyder_kernels\console__main.py", line 11, in
start.main()
File "C:\Users\cbaye\anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 308, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, args, **kwargs)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 545, in initialize
super(IPKernelApp, self).initialize(argv)
File "", line 2, in initialize
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app,
args, **kwargs)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\IPython\core\application.py", line 458, in initialize
self.init_profile_dir()
File "C:\Users\cbaye\anaconda3\lib\site‑packages\IPython\core\application.py", 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\profiledir.py", 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\configurable.py", line 73, in
init
super(Configurable, self).
init(**kwargs)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\traitlets.py", line 1000, in
init
super_kwargs[key] = value
File "C:\Users\cbaye\anaconda3\lib\contextlib.py", line 119, in
exit
next(self.gen)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\traitlets.py", line 1131, in hold_trait_notifications
self.notify_change(change)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\traitlets.py", line 1176, in notify_change
c(change)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\IPython\core\profiledir.py", 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\traitlets.py", line 585, in
set__
self.set(obj, value)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\traitlets.py", line 574, in set
obj._notify_trait(self.name, old_value, new_value)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\traitlets.py", line 1139, in _notify_trait
type='change',
File "C:\Users\cbaye\anaconda3\lib\site‑packages\traitlets\traitlets.py", line 1176, in notify_change
c(change)
File "C:\Users\cbaye\anaconda3\lib\site‑packages\IPython\core\profiledir.py", line 120, in check_startup_dir
shutil.copy(src, readme)
File "C:\Users\cbaye\anaconda3\lib\shutil.py", line 248, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "C:\Users\cbaye\anaconda3\lib\shutil.py", 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
vîšhäł.đ.ś
@vishalds10_twitter
Spyder crashed and i have uninstalled and installed again again it show spyder crashed
1 reply
Nikolaos Triantafyllis
@nikosT
Hi, I can' install Spyder4 on my Linux Mint 19.3. I see no repo on v4.
4 replies
landauroj
@landauroj
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
@kaguouille_gitlab

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
vîšhäł.đ.ś
@vishalds10_twitter
spyder crashed during last session
what to do
2 replies
Ananay
@Ananaychadha_twitter
How to disable text suggestion in spyder
1 reply
Simon Savitt
@SimonSavitt
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 :)
landauroj
@landauroj
You may enter $ clear or >>> clear ; and the prompt return to initial states without using the kernel
yasaminLG
@yasaminLG
hello, im tring to run pexpect.spawn() but I'm getting AttributeError: module 'pexpect' has no attribute 'spawn' any advise?
1 reply
Paul B
@pborgen
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
@iam_ifthy_twitter
hello i need a help
i removed variable in Spyder. now how to restore it
1 reply
BocajC
@BocajC
I am having trouble running Jupyter notebooks , I installed the plugin via conda, is there anything else I have to do?
10 replies
pemstanley
@pemstanley

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
pemstanley
@pemstanley
this is after I fixed the IBUS permissions issue....
barry-vt
@barry-vt
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
@Dhivyabharthi_twitter
Hi
I am facing problem in working with beautiful soup in Spyder ide
It shows attribute error
2 replies
AldoMaine
@AldoMaine
Hi. What is the best way to be notified of new Spyder releases?
4 replies
mvorm
@mvorm
Hi, how to install request and BeautifulSoup?
1 reply
imran111-khan
@imran111-khan
hi
i am facing kernel problem
Kernel died, restarting
1 reply
Gilad77711
@Gilad77711
Hi there,
Could you help me run Spyder reports plug-in?
1 reply
MarionDugué
@MarionDugue
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
@Akashtyagi08
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
@Akashtyagi08
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
lucaluisa
@lucaluisa

Hello,
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
@anjumuaf123_twitter
hi sir how to ignore negative floating values in a data set ?
1 reply
Somasekhar
@Somasekhargit

Hi, I am getting error in Spyder, File "C:\ProgramData\Anaconda3\lib\json\decoder.py", 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
Pandeiro-vx
@Pandeiro-vx
Hi, I am new to SPYDER IDE, I am getting runfile('C:/Users/adamb/AppData/Local/Temp/spyder/PREOS BubP.py', 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
@doc_icus_twitter
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
@ManjotSingh0992_twitter
hello, pls guide me. I want to downLoad pyaudio. but i am not ABLE TO
1 reply
PLSSSSS
Manjot Singh
@ManjotSingh0992_twitter
pls its urgent
elfunambolo
@elfunambolo
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
vrpotluri
@vrpotluri
Hi is there an easy way to comment and un-comment python code in spryder
1 reply