Discussion:
Error pd.set_option('display.width', 10000)
Add Reply
gelukt gelukt
2024-02-03 23:02:05 UTC
Reply
Permalink
Dear,

While running a code, I get the error below:
What does this error mean? How can I fix this error?

C:\Users\brech\Desktop\Crypto\venv\Scripts\python.exe "C:/Users/brech/Desktop/Crypto/Project/aaa Arbitrage.py"
Traceback (most recent call last):
File "C:\Users\brech\Desktop\Crypto\Project\aaa Arbitrage.py", line 458, in <module>
methode()
File "C:\Users\brech\Desktop\Crypto\Project\aaa Arbitrage.py", line 49, in methode
wb.sheets[website]['A' + str(1+a)].value = inputString[startIndex:startIndex + 30000]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\xlwings\main.py", line 2411, in value
conversion.write(data, self, self._options)
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\xlwings\conversion\__init__.py", line 102, in write
pipeline(ctx)
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\xlwings\conversion\framework.py", line 79, in __call__
stage(*args, **kwargs)
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\xlwings\conversion\standard.py", line 75, in __call__
self._write_value(ctx.range, ctx.value, scalar)
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\xlwings\conversion\standard.py", line 63, in _write_value
rng.raw_value = value
^^^^^^^^^^^^^
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\xlwings\main.py", line 1973, in raw_value
self.impl.raw_value = data
^^^^^^^^^^^^^^^^^^^
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\xlwings\_xlwindows.py", line 1209, in raw_value
self.xl.Value = data
^^^^^^^^^^^^^
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\xlwings\_xlwindows.py", line 161, in __setattr__
return setattr(self._inner, key, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\win32com\client\__init__.py", line 597, in __setattr__
self._oleobj_.Invoke(*(args + (value,) + defArgs))
pywintypes.com_error: (-2147352567, 'Er is een uitzondering opgetreden.', (0, None, None, None, 0, -2147024882), None)

Process finished with exit code 1

Kind regards

Gelukt
MRAB
2024-02-04 03:50:32 UTC
Reply
Permalink
Post by gelukt gelukt
Dear,
What does this error mean? How can I fix this error?
C:\Users\brech\Desktop\Crypto\venv\Scripts\python.exe "C:/Users/brech/Desktop/Crypto/Project/aaa Arbitrage.py"
File "C:\Users\brech\Desktop\Crypto\Project\aaa Arbitrage.py", line 458, in <module>
methode()
File "C:\Users\brech\Desktop\Crypto\Project\aaa Arbitrage.py", line 49, in methode
wb.sheets[website]['A' + str(1+a)].value = inputString[startIndex:startIndex + 30000]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\xlwings\main.py", line 2411, in value
conversion.write(data, self, self._options)
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\xlwings\conversion\__init__.py", line 102, in write
pipeline(ctx)
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\xlwings\conversion\framework.py", line 79, in __call__
stage(*args, **kwargs)
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\xlwings\conversion\standard.py", line 75, in __call__
self._write_value(ctx.range, ctx.value, scalar)
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\xlwings\conversion\standard.py", line 63, in _write_value
rng.raw_value = value
^^^^^^^^^^^^^
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\xlwings\main.py", line 1973, in raw_value
self.impl.raw_value = data
^^^^^^^^^^^^^^^^^^^
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\xlwings\_xlwindows.py", line 1209, in raw_value
self.xl.Value = data
^^^^^^^^^^^^^
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\xlwings\_xlwindows.py", line 161, in __setattr__
return setattr(self._inner, key, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\brech\Desktop\Crypto\venv\Lib\site-packages\win32com\client\__init__.py", line 597, in __setattr__
self._oleobj_.Invoke(*(args + (value,) + defArgs))
pywintypes.com_error: (-2147352567, 'Er is een uitzondering opgetreden.', (0, None, None, None, 0, -2147024882), None)
Process finished with exit code 1
There's a question on StackOverflow that looks similar:

https://stackoverflow.com/questions/72223654/pywintypes-com-error-2147352567-exception-occured-0-none-none-none-0

Something to do with the cell format.

Check which cell it i, what value it's trying to put there, and whether
the format of the cell and the value are compatible.

Loading...