# Chapter 4 - error

**URL:** <https://forums.kodeco.com/t/chapter-4-error/74234>\
**Category:** RxSwift\
**Created:** [June 19, 2019, 5:20am UTC](https://forums.kodeco.com/t/chapter-4-error/74234 "2019-06-19T05:20:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![xakacuk](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/xakacuk/32/102075_2.png) [@xakacuk](https://forums.kodeco.com/u/xakacuk)\
**Post date:** [June 19, 2019, 5:20am UTC](https://forums.kodeco.com/t/chapter-4-error/74234/1 "2019-06-19T05:20:21Z")

</div>

i have problem in challenge 2, in func save:

@IBAction func actionSave() {  
guard let image = imagePreview.image else {return}

```
    PhotoWriter.save(image)
        .asSingle()
        .subscribe(
            onSuccess: { [weak self] id in
                self?.showMessage("Saved with id: \(id)")
                self?.actionClear()
            },
            onError: { [weak self] error in
                self?.showMessage("Error", description: error.localizedDescription)
            }
        )
        .disposed(by: disposeBag)
}

```

![28](https://files.chunter.kodeco.com/original/3X/4/6/46c5476930687c0d8dcc980c418774d12db65c8b.png)

i check project challenge form book RxSwift for chapter 4 and my code is the same as the code in the book, but i have problem how screenshot, help me pls

---

<div class="post-metadata">

**Author:** ![cupofjoe](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/cupofjoe/32/110937_2.png) [@cupofjoe](https://forums.kodeco.com/u/cupofjoe)\
**Post date:** [June 19, 2019, 2:40pm UTC](https://forums.kodeco.com/t/chapter-4-error/74234/2 "2019-06-19T14:40:08Z")

</div>

That static func is defined in another area. Look in Classes/PhotoWriter.swift.

For me it’s on line 39.

Cheers,

Ed

---

<div class="post-metadata">

**Author:** ![xakacuk](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/xakacuk/32/102075_2.png) [@xakacuk](https://forums.kodeco.com/u/xakacuk)\
**Post date:** [June 19, 2019, 3:01pm UTC](https://forums.kodeco.com/t/chapter-4-error/74234/3 "2019-06-19T15:01:08Z")

</div>

i delete static, error change PhotoWriter.save(image) to \<\<‘UIImage’ is not convertible to ‘PhotoWriter’\>\>

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [April 8, 2021, 12:34am UTC](https://forums.kodeco.com/t/chapter-4-error/74234/5 "2021-04-08T00:34:46Z")

</div>



---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [April 8, 2021, 12:35am UTC](https://forums.kodeco.com/t/chapter-4-error/74234/6 "2021-04-08T00:35:00Z")

</div>

@xakacuk Do you still have issues with this?
