Exception ignored in: <generator object iter_slices at 0x7f...90>

I am getting an annoying warning message from requests library. Everything seem to work fine except that the message is extremely annoying and I'm having a lot of them. That's how it looks like.

```
Exception ignored in: <generator object iter_slices at 0x7f332d3cf990>
Traceback (most recent call last):
  File "/home/mqu/.pyenv/versions/3.6.2/lib/python3.6/site-packages/requests/utils.py", line 449, in iter_slices
    def iter_slices(string, slice_length):
SystemError: error return without exception set
```

This is the only line where I'm using requests in my program, I'm just sending JSON to different servers once in a while.

```
 requests.post(url, json={'command': command, 'arguments': arguments}).json()
```

Could this error message be more descriptive? What can I do to make it go away?
Anything else I can provide to you to help me identify the cause?
Thanks in advance.

requests-2.18.4


The usage of requests will not by itself throw such an exception. Can you provide a [SSCCE](http://www.sscce.org/) that demonstrates the problem?

This works fine:

```python
import requests

body = {"foo": 1, "bar": "BAR", "baz": True}
response = requests.post("https://httpbin.org/post", json=body)
print(response)
print(response.json())
```

```
<Response [200]>
{'url': 'https://httpbin.org/post', 'args': {}, 'data': '{"foo": 1, "bar": "BAR", "baz": true}', 'origin': '85.183.143.30', 'json': {'foo': 1, 'bar': 'BAR', 'baz': True}, 'headers': {'Accept': '*/*', 'Content-Length': '37', 'Host': 'httpbin.org', 'Content-Type': 'application/json', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'python-requests/2.12.4', 'Connection': 'close'}, 'files': {}, 'form': {}}
```




@mikkqu, this exception is raised when a python module calls out to a C module, raising an exception but no exception info is sent back. Requests is a pure Python module, so I don't believe we can be generating this message.

A cursory google search suggests you're likely using numpy or cpickle to generate some of your json parameter content. Is that correct?

@nateprewitt I'm inclined to agree that this isn't something Requests can fix. It's also plausible that this is being caused by [simplejson](https://github.com/requests/requests/blob/d1fb1a29ab949223d8d64797e0fcc9a7d2690483/requests/compat.py#L29) so there are many possible causes to this bug and none of them can we really help with. They're all entirely outside our domain to fix.

Got the same after (I think) I updated to python 3.6.4 (from 3.6.1). I use requests (2.18.4). I get this error when simply downloading files, not simplejson or anything fancy. The error happens for every download in my script and shows like this for one download. If I have two downloads it will result in 2x parse.py error and 2x utils.py error, and so on.

> Exception ignored in: <generator object urlsplit.<locals>.<genexpr> at 0x00000000039A6990>
> Traceback (most recent call last):
>   File "C:\Program Files\Python34\lib\urllib\parse.py", line 431, in <genexpr>
>     if not rest or any(c not in '0123456789' for c in rest):
> SystemError: error return without exception set
> Exception ignored in: <generator object iter_slices at 0x00000000039A67D8>
> Traceback (most recent call last):
>   File "C:\Program Files\Python34\lib\site-packages\requests\utils.py", line 449, in iter_slices
>     def iter_slices(string, slice_length):
> SystemError: error return without exception set


-----
Sometimes I get this (response.py too):

> Exception ignored in: <generator object urlsplit.<locals>.<genexpr> at 0x00000000039A67D8>
> Traceback (most recent call last):
>   File "C:\Program Files\Python34\lib\urllib\parse.py", line 431, in <genexpr>
>     if not rest or any(c not in '0123456789' for c in rest):
> SystemError: error return without exception set
> Exception ignored in: <generator object HTTPResponse.__init__.<locals>.<genexpr> at 0x00000000039A67D8>
> Traceback (most recent call last):
>   File "C:\Program Files\Python34\lib\site-packages\urllib3\response.py", line 150, in <genexpr>
>     encodings = (enc.strip() for enc in tr_enc.split(","))
> SystemError: error return without exception set
> Exception ignored in: <generator object iter_slices at 0x00000000066F6B48>
> Traceback (most recent call last):
>   File "C:\Program Files\Python34\lib\site-packages\requests\utils.py", line 449, in iter_slices
>     def iter_slices(string, slice_length):
> SystemError: error return without exception set



-----
And this all happens in a simple block like this:
```
with open( os.path.join( file_path ), "wb") as f:   # w: overwrite if exists
   print("Downloading", items[1])
   f.write( session.get(items[1], timeout=2).content )
```
This will then print
> Downloading https://....
> Exception ignored in: <generator object urlsplit.<locals>.<genexpr> at 0x000000000383AA98>
> ...

_Interestingly, the first 60 downloads or so work perfectly fine._

I'll try to get some pure code example that I can share.

And one other thing I (think I) just realized - you will not see this error when you just run the .py file in Windows. Using PyDev (Eclipse) will show the errors though for whatever reason. And again it always starts after lots of downloads are done.

We're also experiencing this and are having a hard time figuring out how to investigate it further. I does look like it originates from our call to `json.dumps(object)`, which happens before we send a POST request.