Comments (3)
Creating a VirtualTimeScheduler and passing it in as a parameter to the interval method fixed the prior attribute error but has resulted in a new one. Please see the output below...
import rx
vs = rx.concurrency.VirtualTimeScheduler()
rx.Observable.interval(1000, vs).subscribe(lambda x: print(x))
Traceback (most recent call last):
File "", line 1, in
File "c:\Python34\lib\site-packages\rx\observable.py", line 47, in subscribe
return self._subscribe(observer)
File "c:\Python34\lib\site-packages\rx\anonymousobservable.py", line 32, in _subscribe
if not auto_detach_observer.fail(ex):
File "c:\Python34\lib\site-packages\rx\abstractobserver.py", line 52, in fail
self.error(exn)
File "c:\Python34\lib\site-packages\rx\autodetachobserver.py", line 24, in error
self.observer.on_error(exn)
File "c:\Python34\lib\site-packages\rx\abstractobserver.py", line 34, in on_error
self.error(error)
File "c:\Python34\lib\site-packages\rx\internal\basic.py", line 24, in default_error
raise err
File "c:\Python34\lib\site-packages\rx\anonymousobservable.py", line 30, in _subscribe
auto_detach_observer.disposable = subscribe(auto_detach_observer)
File "c:\Python34\lib\site-packages\rx\linq\observable_time.py", line 136, in subscribe
return scheduler.schedule_periodic(period, action, state=0)
File "c:\Python34\lib\site-packages\rx\concurrency\virtualtimescheduler.py", line 64, in schedule_periodic
return scheduler.start()
File "c:\Python34\lib\site-packages\rx\concurrency\scheduleperiodicrecursive.py", line 36, in start
dis.disposable = self._scheduler.schedule_recursive_relative(self._period, self.tick, 0)
File "c:\Python34\lib\site-packages\rx\concurrency\scheduler.py", line 96, in schedule_recursive_relative
return self.schedule_relative(duetime, action1, state={ "first": state, "second": action })
File "c:\Python34\lib\site-packages\rx\concurrency\virtualtimescheduler.py", line 45, in schedule_relative
runat = self.add(self.clock, self.to_relative(duetime))
AttributeError: 'VirtualTimeScheduler' object has no attribute 'add'
from rxpy.
The VirtualTimeScheduler is virtual, so you need to use a subclass like the TestScheduler
from rxpy.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from rxpy.
Related Issues (20)
- [Question] shiping data between asyncio and rxpy HOT 1
- [Question] Reading/writing from/to a Pandas DataFrame in rxpy HOT 2
- [TESTING] Notification equality uses string representation HOT 2
- Cannot pickle reactive classes
- unexpected behaviour regarding item count HOT 2
- Zip operator does not work HOT 3
- Rolling throttle operator
- reactivex.timer emits immediately on second subscription HOT 1
- Unexpected results of switch_map operator HOT 1
- Verson number in GitHub release is 0.0.0
- [BUG] buffer_with_time_or_count lost some data HOT 1
- [BUG] buffer_with_time_or_count loses data
- Python 3.12 deprecates timezone non aware utcfromtimestamp() and utcnow()
- This is a concurrent library, but not thread safe?
- AsyncIOScheduler.schedule is not thread safe!
- RxPY/ example / timer.py broken: Future is not iterable
- switch_map() operator not listed in documentation
- `operators.retry(n)` interferes with non-erroring repeats
- Concurrent Execution Not Working as Expected with RxPY ThreadPoolScheduler HOT 1
- Questions about Copilot + Open Source Software Hierarchy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxpy.