primordic/IssueDupesLite huggingface dataset:
Repository: kernc/backtesting.py

Issue #803: Plotting does not work with Bokeh v3.0
Created: 2022-11-08T12:05:25Z
Expected Behavior
I installed the tool and all required libraries on Ubuntu 22.04, Python 3.11.0 and ta-lib (compiled from latest source code 0.4.0). The backtest from the example code on home page was run. The test itself ran without
problems but the plot html does not work. It should show the graph.
Actual Behavior
Please see the attached. The html layout is not working. Strangely, no JS error from browser console.

Steps to Reproduce


Install backtesting.py
Run the example code on the project home page
Open the plot in IE Edge

Additional info



Backtesting version: 0.3.3

Duplicate issue #804: Javascript Error: Can't plot and graph doesn't show
Created: 2022-11-10T17:02:54Z
I constructed a backtest in the following way:
def bb_ub(df_close, n, n_std):
    r = pd.Series(df_close).rolling(n)
    return r.mean() + (n_std * r.std())

def bb_m(df_close, n):
    return pd.Series(df_close).rolling(n).mean()

def bb_lb(df_close, n, n_std):
    r = pd.Series(df_close).rolling(n)
    return r.mean() - (n_std * r.std())

class BB(Strategy):
    
    # Strategy variables
    N = 20
    N_STD = 2
    
    def init(self):
        self.ub = self.I(bb_ub, self.data['Close'], self.N, self.N_STD)
        self.m = self.I(bb_m, self.data['Close'], self.N)
        self.lb = self.I(bb_lb, self.data['Close'], self.N, self.N_STD)

    def next(self):
        close = self.data['Close'][-1]
        if crossover(self.data['Close'], self.ub):
            self.sell(sl=1.05 * close, tp=0.95 * close)
        
        elif crossover(self.data['Close'], self.lb):
            self.buy(sl=0.95 * close, tp=1.05 * close)

bt = Backtest(
    df, 
    BB, 
    cash=10_000_000.0, 
    commission=.002, 
    exclusive_orders=True
)
stats = bt.run()
where df looks like:

and the backtest results look likt:

And tried to plot the backtest graph by:
j = bt.plot()
However it showed me the following error
Javascript Error: unable to decode an object of type 'Row'



Backtesting version: 0.3.3
bokeh version: 2.4.3 (Saw #803 so installed 2.4.3 instead)

Closing comment (2022-12-13T14:16:30Z): Let's consider this a duplicate of #803.
Repository: kernc/backtesting.py

Issue #20: Backtest multiple instruments at once 
Created: 2019-09-05T09:58:34Z
Im trying to backtest a pairs trading strategy but i don't know how to add multiple data frames to the backtester in order to add positions to each instruments according to the hedge ratio.
Is there a way to do this?

Duplicate issue #196: Are there plans to support multi-asset portfolio rebalancing?
Created: 2020-12-14T03:34:40Z

Closing comment (2020-12-14T10:07:34Z): Not really. For that use bt, I guess.
Duplicate of #20.
Repository: kernc/backtesting.py

Issue #94: Why the use of Bokeh for graphing and not plotly?
Created: 2020-06-21T15:25:25Z
Just a general question to understand the choice?

Duplicate issue #176: plot with different packages?
Created: 2020-11-09T13:28:11Z
Is it possible to plot with alternative libraries?

Closing comment (2020-11-09T15:28:25Z): Is this a duplicate of #94? 😄

Is it possible to plot with alternative libraries?

Why?
Repository: kernc/backtesting.py

Issue #715: Negative Sharpe Ratio!
Created: 2022-08-10T14:09:21Z
why Sharpe ratio is zero in case of negative return?

Duplicate issue #793: Backtester is not calculating Sharpe/Sortino/Calmar Ratio
Created: 2022-10-26T15:36:30Z
Expected Behavior
When I run the backtester I expect to have all the metrics calculated, included the Sharpe R, Sortino R and Calmar R, instead, it is not calculating anyone of those metrics. Is it probably a bug?
Actual Behavior

Steps to Reproduce






class MyStrat(Strategy):
    
    riskpct = 0.01
    rsi_window = 2
    os = 5
    ob = 95
    sl_buy = 0.985
    tp_buy = 1.03
    sl_sell = 1.015
    tp_sell = 0.97

    
    def init(self):
        super().init()

        self.vwap = self.I(lambda: ta.vwap(self.data.High.s, self.data.Low.s, self.data.Close.s, self.data.Volume.s, anchor='W'))
        self.rsi = self.I(lambda: ta.rsi(self.data.Close.s, length=self.rsi_window))
        self._trade_max_cash = self.equity * self.riskpct

    def next(self):
        super().next()

        price = self.data.Close[-1]
        
        # if self.position:
        #     self.position.close()
        
          
        if self.rsi <= self.os and price > self.vwap:
            self.position.close()       
            
            self.buy(sl = self.sl_buy*price, tp = self.tp_buy*price, size = int(self._trade_max_cash//price)) 
            
        elif self.rsi >= self.ob and price < self.vwap:  
            self.position.close()

            self.sell(sl = self.sl_sell*price, tp = self.tp_sell*price, size = int(self._trade_max_cash//price)) 

bt = Backtest(df1, MyStrat, cash=1000000, margin=1/1, commission = 0.0006, trade_on_close=True, hedging=True, exclusive_orders=True)
stat = bt.run()
print(stat)
Additional info


Backtesting version: 0.3.3

Closing comment (2022-12-05T16:14:17Z): Duplicate of #715.
Repository: kernc/backtesting.py

Issue #139: How to transfer user-defined variable to user-defined strategy class
Created: 2020-09-09T21:08:05Z
Hi, sorry that I'm not very familiar with this nice tool yet.
I defined a strategy class called Parcel. I want to pass a variable (for example, named as input_variable) when a new instance of Parcel is created.
I tried to write as:
class Parcel(SignalStrategy,
               TrailingStrategy):
    
    def init(self, input_variable = 10):
        super().init()
        print(input_variable )
        ....


bt = Backtest(GOOGL, Parcel, input_variable = 5, cash = 10000, commission=.002)

The error is:
TypeError: __init__() got an unexpected keyword argument 'input_variable '

I think this might due to that I don't really understand the meaning of , *,  (the star sign)  in the reference manual:
class Backtest
(
data, strategy, *, cash=10000, commission=0.0, margin=1.0, trade_on_close=False, hedging=False, exclusive_orders=False)

How should I correct my code properly?
Thanks a lot!

Duplicate issue #138: How to transfer user-defined variable to user-defined strategy class [Duplicate question due to network problem]
Created: 2020-09-09T21:06:36Z
Hi, sorry that I'm not very familiar with this nice tool yet.
I defined a strategy class called Parcel. I want to pass a variable (for example, named as input_variable) when a new instance of Parcel is created.
I tried to write as:
class Parcel(SignalStrategy,
               TrailingStrategy):
    
    def init(self, input_variable = 10):
        super().init()
        print(input_variable )
        ....


bt = Backtest(GOOGL, Parcel, input_variable = 5, cash = 10000, commission=.002)

The error is:
TypeError: __init__() got an unexpected keyword argument 'input_variable '

I think this might due to that I don't really understand the meaning of , *,  (the star sign)  in the reference manual:
class Backtest
(
data, strategy, *, cash=10000, commission=0.0, margin=1.0, trade_on_close=False, hedging=False, exclusive_orders=False)

How should I correct my code properly?
Thanks a lot!

Closing comment (2020-09-09T21:20:40Z): Duplicate of #139.
Repository: kernc/backtesting.py

Issue #803: Plotting does not work with Bokeh v3.0
Created: 2022-11-08T12:05:25Z
Expected Behavior
I installed the tool and all required libraries on Ubuntu 22.04, Python 3.11.0 and ta-lib (compiled from latest source code 0.4.0). The backtest from the example code on home page was run. The test itself ran without
problems but the plot html does not work. It should show the graph.
Actual Behavior
Please see the attached. The html layout is not working. Strangely, no JS error from browser console.

Steps to Reproduce


Install backtesting.py
Run the example code on the project home page
Open the plot in IE Edge

Additional info



Backtesting version: 0.3.3

Duplicate issue #922: Beginner's question - no Plot, please help
Created: 2023-02-25T18:30:26Z
Hello, I'm very new to Python and backtesting.py, I'm sure this error has been sorted but I can't find where.
I'm simply trying to compute the example with the exact code given with the package
I get an empty plot as a result.
Expected Behavior
Get the same plot as in example
Actual Behavior
White screen with axis on the right of the html file
I also get the following warning:
BokehDeprecationWarning: Passing lists of formats for DatetimeTickFormatter scales was deprecated in Bokeh 3.0. Configure a single string format for each scale
/Users/michael/PycharmProjects/Carry_optimizer/venv/lib/python3.11/site-packages/backtesting/_plotting.py:250: UserWarning: DatetimeFormatter scales now only accept a single format. Using the first provided: '%d %b'
formatter=DatetimeTickFormatter(days=['%d %b', '%a %d'],
Steps to Reproduce
1.Run the following code
Run the following code:
from backtesting import Backtest, Strategy
from backtesting.lib import crossover

from backtesting.test import SMA, GOOG


class SmaCross(Strategy):
    def init(self):
        price = self.data.Close
        self.ma1 = self.I(SMA, price, 10)
        self.ma2 = self.I(SMA, price, 20)

    def next(self):
        if crossover(self.ma1, self.ma2):
            self.buy()
        elif crossover(self.ma2, self.ma1):
            self.sell()


bt = Backtest(GOOG, SmaCross, commission=.002,
              exclusive_orders=True)
stats = bt.run()
print(stats)
bt.plot()
python code goes here
Additional info


Backtesting version: 0.3.3
bokeh.3.0.3
OS: MacOS 12.5

Closing comment (2023-02-25T18:47:34Z): Thanks!!On 25 Feb 2023, at 18:37, kernc ***@***.***> wrote:﻿
Duplicate of #803.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
Repository: kernc/backtesting.py

Issue #43: Close position and stay in cash
Created: 2020-02-05T08:41:31Z
Is there a way to enter a trade and just close it and stay in cash without going the opposite direction?  Looking at the docs (please correct me if I am wrong), the buy and sell methods close out all existing positions and use all available capital to enter a new position in the opposite direction.  Is there a way to just close a position and stay that way until a strategy condition is met to re-enter?
Thanks in advance.

Duplicate issue #221: How to close position and simply be in cash?
Created: 2021-01-05T16:28:51Z
Expected Behavior
Actual Behavior

Steps to Reproduce






Additional info


Backtesting version: 0.?.?

Closing comment (2021-01-05T16:41:52Z): Duplicate of #43.
Repository: kernc/backtesting.py

Issue #248: Would it be possible to add a positive commission?
Created: 2021-02-11T19:02:32Z
I'm trying to backtest a limit orders based strategy on a crypto exchange named bybit. The problem is that you get rebates when you use limit orders. But I see I can't enter positive commissions (-0.00025). Would it be possible to change this?
AssertionError: commission should be between 0-10%, is -0.00025

Duplicate issue #301: Negative commission
Created: 2021-04-04T16:50:58Z
Hi, I see the library does not allow negative commissions (rebates):
https://github.com/kernc/backtesting.py/blob/master/backtesting/backtesting.py#L667
Some exchanges (i.e. Bybit) offer that for Maker orders. Could you please add this possibility?

Closing comment (2021-04-04T17:06:43Z): Duplicate of #248.
Repository: kernc/backtesting.py

Issue #623: commission in dollar value
Created: 2022-04-04T03:15:08Z
Expected Behavior
able to set commission in dollars, disregard percentage. Some instruments I know (futures for example) has a fixed commission per trade, instead of percentage, there should be a switch to set % or $.
Actual Behavior
only percentage is available
Additional info

Backtesting version: 0.3.3

Duplicate issue #628: Recomendation: commission and lot size by risk% inside self.sell() and self.buy()
Created: 2022-04-06T21:47:16Z
Probably this could be implemented when one define to open a sell or buy position:

Let the user to set a fixed commission in usd per lot traded, example: let the user set 4 usd per lot traded
Let the user to call the current balance inside the "size" parameter so we can calculate our LOT_SIZE (Larry William's formula) using a risk% and the StopLoss used, example: size = (balance*riskpct)/(slatr*contractsize)

Example:
    if self.data.Close >= self.ema and self.rsi <= 10:
        sl1 = price - slatr
        tp1 = price + slatr*TPSLRatio 
        riskpct = 0.01
        fixedcommission = 4
        contractsize = 100000

        self.buy(sl=sl1, tp=tp1, size = (balance*riskpct)/(slatr*contractsize), commission = fixedcommission)
        

    if self.data.Close <= self.ema and self.rsi >= 90:
        sl2 = price + slatr
        tp2 = price - slatr*TPSLRatio
        riskpct = 0.01
        fixedcommission = 4
        contractsize = 100000            

        self.sell(sl=sl2, tp=tp2, size = (balance*riskpct)/(slatr*contractsize), commission = fixedcommission)

Closing comment (2022-04-07T13:19:56Z): Sure, share the plot, but leave out any meaningful code. 😝
If you take Strategy.equity for balance, you can compute appropriate size= yourself.
Other than that, I see this issue is a duplicate of #623.
Welcome to use Discussions to address broader topics/ideas.
Repository: kiswa/TaskBoard

Issue #572: Moving tasks is broken
Created: 2020-11-25T08:55:59Z
To move one task from one column to another isn't working anymore since we updated to 1.0.2.
Steps to reproduce the behavior:

Click on a task, drag it to another column and drop it
or
Right-click on a task and "Move to Column:" - select a column

Expected behavior

I expect the task to be moved to the destination column. But no notification popup is shown nor Email is send. The task is even shown in the destination column. But if I press F5 to refresh, the tasks appears in the source column again.
I expect the task to show up in the destination column. A notification popup is shown and an Email is send. But the task is displayed in the source column. After pressing F5 the task is shown in the destination column as expected.


OS: Windows 10
Browsers tested: Chrome 87 Firefox 83

Duplicate issue #590: Task placement isn't saved
Created: 2021-05-12T09:37:22Z
Describe the bug
I'm not sure if this is a bug or a problem with our setup.
I can add, remove and reorganize tasks. If I move a task between columns, then log out and in, the tasks often aren't moved.
To Reproduce

Move several tasks to another column
Log out, log in
Tasks may or may not be moved.

Expected behavior
That tasks remain where I put them.
Screenshots
https://nextcloud.copyleft.no/index.php/s/xTnMYTKP9ADHqaC
Please complete the following information:

OS: ubuntu
Browser Firefox
Version taskboard 1.0.2

Closing comment (2021-05-20T09:30:25Z): This may be a duplicate of #572.
Repository: kiswa/TaskBoard

Issue #358: Permission denied
Created: 2017-05-17T15:55:35Z
all files have permissions set to 666 and do not take permissions changes. not able to install.
vagrant@vagrant:/var/www/TaskBoard-master/TaskBoard-master$ ./build/composer.phar install
bash: ./build/composer.phar: Permission denied

Duplicate issue #359: Trying to install on AWS.
Created: 2017-05-23T07:45:00Z
ubuntu@ip-xxx-xx-xx-xx:/var/www/html/TaskBoard-master$ ./build/build-all
Building...
Installing dependencies
./build/build-all: line 10: ./build/composer.phar: Permission denied

Closing comment (2017-05-23T14:13:10Z): Duplicate of #358
Repository: kiswa/TaskBoard

Issue #31: No date in just added comment
Created: 2014-10-21T13:29:46Z
When I just added a comment, there is no date shown. However when I reload the task, the date succesfully appears.

Duplicate issue #72: Uploaded files
Created: 2014-10-30T17:23:29Z
In the description of the uploaded file it says "Uploaded by on ..."
It's missing the username

Closing comment (2014-10-31T01:21:41Z): Does it remain missing if you refresh? It's likely related to #31
Repository: kiswa/TaskBoard

Issue #160: Easy adding links, files, images, etc.
Created: 2015-04-12T12:08:57Z
Hi,
after starting using taskboard, I figured out that I miss a bit the documentation part for a particular task.
At the moment I can add a comment and this comment can contain a link or a other markup.
Furthermore, I can add files.
This all appears in a comment like thread.
I would love to see more possibilities e.g. being able to easily add images (thumbnail inline images), easy way to add links, movies (inline player), audio (inline player), and being able to open files with certain mime types e.g. txt, pdf, odt, doc, etc.
Or in other words, I would love if Taskboard would have a bit more documentation capabilities.
That would allow me to collect all kind of various information to a task and hence by time get all the infos needed to finalize it.
I think the markdown capable Description filed is capable of supporting many of the above features. However, it could be made easier to add multimedia data, e.g.,  adding a toolbar above the  Description field. Furthermore, a file-view to see all attached files could be useful.

Duplicate issue #161: Connection to owncloud
Created: 2015-04-12T12:19:50Z
Hi,
Adding an owncloud link (both shared and from the file view within owncloud) in a item description works very well. I believe this  nicely combines capabilities of owncloud and Taskboard. It might be worse to add this as an example. In case the owncloud user is logged in clicking the link will start a download. If not logged in, the owncloud login window will appear and after that the download will be started.
E.g.
[https://demo.owncloud.org/index.php/apps/files/ajax/download.php?dir=%2F&files=Demo%20Image%20-%20ccc.jpg](Owncloud Demo Server Image)

will allow to directly download an image from the owncloud demo server.

Closing comment (2015-04-13T16:51:11Z): Well I agree it is not an issue.
However, I was happy to notice that the interaction with other programs works via links rather well. You can also link against online mailers like gmail.
You are right, it might be worse to add this to the documentation.
However, it might be somehow related to #160  if you consider adding a toolbar to the description field
Repository: kiswa/TaskBoard

Issue #222: Issues during installation
Created: 2015-10-02T08:32:53Z
The second step did not work:
2.    Install the PHP dependencies via composer. Open TaskBoard/build/ in a terminal and run ./composer.phar install
Open TaskBoard/build/ in a terminal and run ./build-all.

I got the following error:
Composer could not find a composer.json file in /home/caneill/Travail/TaskBoard/build

Indeed the composer.json is in TaskBoard/ and not in TaskBoard/build/
Secondly curl seems to also be a dependency.

Duplicate issue #223: No composer.json file under TaskBoard/build
Created: 2015-10-10T05:38:41Z
There is no composer.json file under TaskBoard/build so 2nd step of installation with command "./composer.phar install" generates this error:
Composer could not find a composer.json file in /var/www/TaskBoard/build
In order to run this command successfully you need to copy /var/www/composer.json to /var/www/TaskBoard/build/composer.json

Closing comment (2015-10-12T18:24:10Z): This is a duplicate of #222.
Repository: kiswa/TaskBoard

Issue #62: WYSIWYG Markdown/Text editor
Created: 2014-10-26T00:29:01Z
Since you are using AngularJS could you use something like this: http://ngmodules.org/modules/textAngular
Markdown is easy, yes, but if at some point I want to think about deploying this to some of my lo-tek staff. I have one guy who will only send emails in all caps, even after repeatedly telling him not to.  And he's a supervisor.  (And truthfully, he probably wouldn't use it. he'd just hit that caps lock and keep going ;)

Duplicate issue #160: Easy adding links, files, images, etc.
Created: 2015-04-12T12:08:57Z
Hi,
after starting using taskboard, I figured out that I miss a bit the documentation part for a particular task.
At the moment I can add a comment and this comment can contain a link or a other markup.
Furthermore, I can add files.
This all appears in a comment like thread.
I would love to see more possibilities e.g. being able to easily add images (thumbnail inline images), easy way to add links, movies (inline player), audio (inline player), and being able to open files with certain mime types e.g. txt, pdf, odt, doc, etc.
Or in other words, I would love if Taskboard would have a bit more documentation capabilities.
That would allow me to collect all kind of various information to a task and hence by time get all the infos needed to finalize it.
I think the markdown capable Description filed is capable of supporting many of the above features. However, it could be made easier to add multimedia data, e.g.,  adding a toolbar above the  Description field. Furthermore, a file-view to see all attached files could be useful.

Closing comment (2015-04-15T16:42:36Z): Upon further review, this feels like a duplicate of #62. I want TaskBoard to be fairly minimal on the display side of things.
Repository: kiswa/TaskBoard

Issue #514: Randomly kicking me out! (Going from Settings to Boards)
Created: 2020-06-19T18:52:40Z
Describe the bug
When browsing to boards or going back and forward from Settings to Boards, I am disconnected and need to login again.
No fix time, it happens randomly
To Reproduce
Steps to reproduce the behavior:

Go to Settings
Clicking back & forward to Boards

Expected behavior
I would expect to have a fix time before timing out.
Even better a simple option on Settings to select 30/60min/2h/4h
Screenshots

Please complete the following information:

OS: Linux Hyperbola 0.3
Browser Iceweasel (based on Firefox)
Version 52.9.20200112 (64-bit)

Additional context
Seems a bug as it is reproducible easily when browsing quickly between Settings & Boards

Duplicate issue #566: Login is lost after a few navigation changes
Created: 2020-10-20T14:41:22Z
Describe the bug
The authorization is lost after a few clicks while browsing between Dashboard, Boards and Settings. Need to re-login after a few clicks. The error occurs with Vivaldi and Firefox borwsers. The Authorization header is not changed by the browser between the API requests.
Chromium Log:
zone.js:3324 GET http://172.19.#.#/api/dashboard/tasks 401 (Unauthorized)
Request Headers:
Accept: application/json, text/plain, /
Accept-Encoding: gzip, deflate
Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7,en-GB;q=0.6
Authorization: eyJ0*****lar4A
Connection: keep-alive
Content-Type: application/json
DNT: 1
Host: 172.19.65.6
Referer: http://172.19.#.#/dashboard
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.106 Safari/537.36
Response:
{status: "failure", data: [], alerts: [{type: "error", text: "Invalid API token."}]}
alerts: [{type: "error", text: "Invalid API token."}]
data: []
status: "failure"
To reproduce

Login
Change the navigation between Dashboard, Boards and Settings

Expected behavior
The login should not be lost after a few seconds of usage.
Please complete the following information:

Server OS: Debian 10
Apache Version: 2.4.38
PHP Version: 7.3.19-1~deb10u1
TaskBoard Version: 1.0.2

Closing comment (2020-10-27T15:13:31Z): Duplicate of #514
Repository: kiswa/TaskBoard

Issue #417: Feature request: Clone Board
Created: 2018-02-22T09:56:56Z
[LowPrior]
Hi,
Would it be possible to clone a board?
preferred with the option to keep/remove the data
=> create a template (with default tasks)
many thanks,
Bart

Duplicate issue #570: Duplicate board
Created: 2020-11-21T22:05:52Z
Is your feature request related to a problem? Please describe.
I create a new standard board for each Trustee meeting of a charity I help run.  These are always identical in their settings for columns and categories. Currently I set them up each month and then set up similar tasks within the columns for each meeting. This can take a bit of time.
Describe the solution you'd like
When creating a Board it would be good to duplicate a previously made Board template
Describe alternatives you've considered
Additional context

Closing comment (2020-11-30T14:24:28Z): Duplicate of #417, if I'm not mistaken.
Repository: kiswa/TaskBoard

Issue #317: apache_request_headers() not exists when running with nginx php-fpm
Created: 2016-10-02T12:08:35Z
modify api/mailFactory.php
add follow code
if( !function_exists('apache_request_headers') ) {
///
function apache_request_headers() {
  $arh = array();
  $rx_http = '/\AHTTP_/';
  foreach($_SERVER as $key => $val) {
    if( preg_match($rx_http, $key) ) {
      $arh_key = preg_replace($rx_http, '', $key);
      $rx_matches = array();
      // do some nasty string manipulations to restore the original letter case
      // this should work in most cases
      $rx_matches = explode('_', $arh_key);
      if( count($rx_matches) > 0 and strlen($arh_key) > 2 ) {
        foreach($rx_matches as $ak_key => $ak_val) $rx_matches[$ak_key] = ucfirst($ak_val);
        $arh_key = implode('-', $rx_matches);
      }
      $arh[$arh_key] = $val;
    }
  }
  return( $arh );
}
///
}

before function getServerHost()
will solve this problem

Duplicate issue #438: apache_request_headers for Lifecycle token
Created: 2018-06-12T08:23:56Z
if(function_exists(apache_request_headers()) && apache_request_headers() && array_key_exists("LifeCycleToken", apache_request_headers())) {
$lifeCycleToken->unserialize(apache_request_headers()["LifeCycleToken"]);
}
The apache_request_headers function exists only for apache servers, if it is launched on Nginx, its call results in an error. You need to implement an alternative option for storing the token.

Closing comment (2018-06-12T14:02:34Z): Duplicate of #317.
Repository: kivy/kivy

Issue #1763: Carousel does't change index
Created: 2014-01-14T13:46:34Z
Hello. I faced with problem, when Carousel does't go to the next slide because index wasn't changed. I looked at on__offset method and found next:
if direction[0] == 'r':
    if _offset <= -width:
        index += 1
    if _offset >= width:
        index -= 1
in my case values was:
(Pdb) _offset
-85.93333333333334
(Pdb) -width
-728.7500000000001

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Duplicate issue #1761: Carousel does't change index
Created: 2014-01-13T22:36:58Z
Hello. I faced with problem, when Carousel does't go to the next slide because index wasn't changed. I've looked at on__offset method and found next:
    if direction[0] == 'r':
        if _offset <= -width:
            index += 1
        if _offset >= width:
            index -= 1
in my case values was:
(Pdb) _offset
-85.93333333333334
(Pdb) -width
-728.7500000000001

Closing comment (2014-01-24T23:07:45Z): It's the same as #1763. Please don't open the same issue twice.
Repository: kivy/kivy

Issue #1959: animating ReferenceListProperty: strange behaviour while setting a duration
Created: 2014-03-13T08:42:02Z
Amination(x=some , y=value , duration=sometime)
and
Amination(pos=(some,value) , duration=sometime)
should behave the same way, but they aren't :  while the former animates smoothly along the whole duration, the latter seems to animate during 1sec and then waits for "sometime-1" sec.
as an example to reproduce:
import kivy
from kivy.animation import Animation
from kivy.app import App
from kivy.uix.button import Button
from kivy.core.window import Window
from kivy.uix.floatlayout import FloatLayout


class TestApp(App):
    def animatePos(self, instance):
        animation = Animation(pos=(Window.width/2 , Window.height/2) , duration=3)
        animation += Animation(pos=(0,0) , duration = 3)
        animation.start(instance)

    def animateXY(self, instance):
        animation = Animation(x=Window.width/2 , y=Window.height/2 , duration=3)
        animation += Animation(x=0,y=0 , duration = 3)
        animation.start(instance)

    def animateSize(self, instance):
        animation = Animation(size=(200,200) , duration=3)
        animation += Animation(size=(50,50) , duration = 3)
        animation.start(instance)

    def animateWH(self, instance):
        animation = Animation(width=200 , height=200 , duration=3)
        animation += Animation(width=50 , height=50 , duration = 3)
        animation.start(instance)

    def build(self):
        f=FloatLayout()
        b1 = Button(size_hint=(None, None), text='pos', on_press=self.animatePos)
        b2 = Button(size_hint=(None, None), text='x-y', on_press=self.animateXY)
        b3 = Button(size_hint=(None, None), pos=(100,100), text='size', on_press=self.animateSize)
        b4 = Button(size_hint=(None, None), pos= (300,100), text='w-h', on_press=self.animateWH)
        f.add_widget(b1)
        f.add_widget(b2)
        f.add_widget(b3)
        f.add_widget(b4)
        return f

if __name__ == '__main__':
    TestApp().run()

Duplicate issue #2160: Animating ReferenceListProperties missapplyes chosen transition
Created: 2014-05-06T11:27:07Z
If a ReferenceListProperty is animated, the transition actually applied is diffrent than one that is chosen.
e.g.: if pos is animatet using linear transition the result looks more like out_quint transition or something similar.
I suspect that might be due to Animation objects's saving widgets original ReferenceListProperty instead of a copy. So when the Animation changes a property that        is part of animated ReferenceListProperty the saved property is changed as well and the result is that the property is changing much faster than intended.

Closing comment (2014-05-07T09:29:46Z): looks the same as #1959  ?
Repository: kivy/kivy

Issue #2844: Live window resizing
Created: 2015-01-12T06:58:02Z
Currently, a Kivy window supports resizing by allowing the user to click and drag the window border, similar to most other applications.
However, the user can not see how the new size affects the application until they release the mouse button, so Kivy applications do not feel to be as responsive or fluid as other applications are.
I would like to have the application resize event to occur while the user is dragging the mouse border, rather than only when the user releases the mouse pointer.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Duplicate issue #4369: Window goes totally black while resizing it on OS X
Created: 2016-06-05T02:29:51Z
While resizing the window, the entire window goes black. It remains black for as long as the corner of the window is held. Once released, the window redraws and returns. Needless to say this looks awful. Any ideas why this would happen and how to fix it?
Installed with the prebuilt Kivy.app
Using Mac OS X 10.11.5 El Capitan
[INFO   ] [Logger      ] Record log in /Applications/Kivy.app/Contents/Resources/.kivy/logs/kivy_16-06-04_5.txt
[INFO   ] [Kivy        ] v1.9.1-dev0
[INFO   ] [Python      ] v2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]
[INFO   ] [Factory     ] 179 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_imageio, img_dds, img_gif, img_sdl2 (img_pil, img_ffpyplayer ignored)
[INFO   ] [OSC         ] using <multiprocessing> for socket
[INFO   ] [Window      ] Provider: sdl2
[INFO   ] [GL          ] OpenGL version <2.1 INTEL-10.14.66>
[INFO   ] [GL          ] OpenGL vendor <Intel Inc.>
[INFO   ] [GL          ] OpenGL renderer <Intel(R) HD Graphics 6000>
[INFO   ] [GL          ] OpenGL parsed version: 2, 1
[INFO   ] [GL          ] Shading version <1.20>
[INFO   ] [GL          ] Texture max size <16384>
[INFO   ] [GL          ] Texture max units <16>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO   ] [Text        ] Provider: sdl2
[INFO   ] [Base        ] Start application main loop
[INFO   ] [GL          ] NPOT texture support is available

Closing comment (2016-06-05T08:18:39Z): Duplicate of #2844, you can find more details there.
Repository: kivy/kivy

Issue #3889: Kivy 1.9.1, ImportError while importing kivy.app.App
Created: 2016-01-04T16:20:13Z
Installed fresh Python2.7.10, Kivy1.9.1 (following instructions from kivy.org website) on Windows7 64bit.
I'm getting an ImportError when I run this code:
from kivy.app import App
from kivy.uix.button import Button


class ButtonApp(App):

    def build(self):
        return Button(text='TEST')


ButtonApp().run()
Console output:
E:\Python27\python.exe E:/workspace/TEST/test_kivy_1.9.1/main.py
[INFO              ] [Logger      ] Record log in C:\Users\Skerleton\.kivy\logs\kivy_16-01-04_38.txt
[INFO              ] [Kivy        ] v1.9.1
[INFO              ] [Python      ] v2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)]
[INFO              ] [Factory     ] 179 symbols loaded
[DEBUG             ] [Cache       ] register <kv.lang> with limit=None, timeout=None
 Traceback (most recent call last):
   File "E:/workspace/TEST/test_kivy_1.9.1/main.py", line 1, in <module>
     from kivy.app import App
   File "E:\Python27\lib\site-packages\kivy\app.py", line 327, in <module>
     from kivy.uix.widget import Widget
   File "E:\Python27\lib\site-packages\kivy\uix\widget.py", line 219, in <module>
     from kivy.graphics import (
   File "E:\Python27\lib\site-packages\kivy\graphics\__init__.py", line 89, in <module>
     from kivy.graphics.instructions import Callback, Canvas, CanvasBase, \
 ImportError: DLL load failed: The specified module could not be found.

Process finished with exit code 1
Kivy installed without issues, except for Gstreamer.
This error is reported by another developer on kivy google group

Duplicate issue #3921: Importing Kivy DLL Issue
Created: 2016-01-16T18:06:42Z
Sigh...Here's another question about Python's never ending module issues. I have Python 3.4 and Windows 8. I can import Kivy fine, but if I try to import kivy.graphics, I run into a DLL issue:
File "C:\Users\Young\Anaconda3\lib\site-packages\kivy\graphics\__init__.py",  line 89, in <module>
 from kivy.graphics.instructions import Callback, Canvas, CanvasBase, \
ImportError: DLL load failed: The specified module could not be found.
Does anyone know how to fix this?

Closing comment (2016-01-17T00:06:52Z): For now, the solution is to use pillow: pip install pillow. However, you'll need to use a nightly kivy as 1.9.1 won't work with pillow I believe. I'm closing this as a duplicate of #3889. If it isn't, please re-open.
Repository: kivy/kivy

Issue #1534: fix doc for properties
Created: 2013-09-29T23:23:47Z
Below "here is a possible implementation in Python" the line "self._a = a" should read "self._a = value" (on page http://kivy.org/docs/api-kivy.properties.html )

Duplicate issue #1535: fix doc for properties
Created: 2013-09-29T23:27:31Z
On page http://kivy.org/docs/api-kivy.properties.html
below "here is a possible implementation in Python" the line "self._a = a" should read "self._a = value"

Closing comment (2013-12-07T16:14:36Z): duplicate of #1534
Repository: kivy/kivy

Issue #2762: Python3, video_gstplayer.py, line 88: self.player.set_volume(self.volume)  AttributeError: 'NoneType' object has no attribute 'set_volume'
Created: 2014-12-20T17:23:54Z
Traceback (most recent call last):
File "/home/johndoe/kivy-examples/demo/kivycatalog/main.py", line 166, in 
KivyCatalogApp().run()
File "/usr/lib/python3/dist-packages/kivy/app.py", line 825, in run
runTouchApp()
File "/usr/lib/python3/dist-packages/kivy/base.py", line 484, in runTouchApp
EventLoop.window.mainloop()
File "/usr/lib/python3/dist-packages/kivy/core/window/window_pygame.py", line 381, in mainloop
self._mainloop()
File "/usr/lib/python3/dist-packages/kivy/core/window/window_pygame.py", line 285, in _mainloop
EventLoop.idle()
File "/usr/lib/python3/dist-packages/kivy/base.py", line 324, in idle
Clock.tick()
File "/usr/lib/python3/dist-packages/kivy/clock.py", line 483, in tick
self._process_events()
File "/usr/lib/python3/dist-packages/kivy/clock.py", line 615, in _process_events
event.tick(self._last_tick, remove)
File "/usr/lib/python3/dist-packages/kivy/clock.py", line 374, in tick
ret = callback(self._dt)
File "/usr/lib/python3/dist-packages/kivy/uix/video.py", line 177, in _do_video_load
self._video.play()
File "/usr/lib/python3/dist-packages/kivy/core/video/video_gstplayer.py
", line 88, in play
self.player.set_volume(self.volume)
AttributeError: 'NoneType' object has no attribute 'set_volume'

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Duplicate issue #7100: kivy video error 'nonetype object has no attribute set_volume'
Created: 2020-09-21T21:23:56Z
Software Versions

Python 3.6:
OS - windows 10:
Kivy - 1.11.1:

Describe the bug
i have this problem in kivy video and video player whenever i run code this error appears
'nonetype' object has no attribute 'set_volume'
The issue tracker is a tool to address bugs only (search known bugs: https://git.io/vM1iE).
Please use the #support Discord channel at https://chat.kivy.org/ or Stack Overflow for
support questions, more information at https://git.io/vM1yQ.
Expected behavior
A clear and concise description of what you expected to happen.
To Reproduce
A short, runnable example that reproduces the issue with latest kivy master.
Code and Logs and screenshots
// REPLACE ME: Paste your code and logs here, a template can be found at https://git.io/vM1id.
Additional context
guys please help this is bugging me from months its eating my brain out

Closing comment (2023-11-02T10:29:08Z): Closing as duplicate of #2762
Repository: kivy/kivy

Issue #7844: 'NoneType' has no attribute 'tell' can be avoided by raising FileNotFoundError.
Created: 2022-03-13T15:36:02Z
Software Versions

Python: 3.9
OS: Linux (Devuan Chimera)
Kivy: 2.1.0
Kivy installation method: pip

Describe the bug
When an image is not found, an obscure error appears: 'NoneType' has no attribute 'tell'
Expected behavior
A meaningful exception (probably FileNotFoundError) should be raised before the problem becomes obscure in later code.
To Reproduce
A short, runnable example that reproduces the issue with latest kivy master.
example1.py in https://github.com/kivy/kivy3
Code and Logs and screenshots
kivy_venv/lib/python3.9/site-packages/kivy/core/image/init.py
        filename = resource_find(filename)
Additional context
There are several users who have been confused by the error:

kivy's fork of kivy3 currently has the problem (diagnosing the simple problem of a missing file was difficult since the error message was unclear; I am the user in this case).
viblo/pymunk#166 (It confused more than one user in this case)
https://www.forexfactory.com/thread/614471-free-machine-learning-tool-with-a-graphical-user-interface?page=2 (This is not a kivy example but is in imagehdr.py which kivy uses).

To be clear, the error goes away in the example code if a png file named "empty.png" is manually placed in the folder (The fact that it is not there is a kivy3 issue). The kivy issue is merely that the error message is unclear, and the suggested fix provides a better error message.
suggested fix
Before the resource_find call, add:
        original_path = str(filename)
After the resource_find call, add:
        if filename is None:
            raise FileNotFoundError(original_path + " was not found.")
Other considerations:

If you rather not have a crash when images are missing, maybe use kivy/default.png and simply show an error rather than raise an exception.

Duplicate issue #6660: Loader.image dont throw exceptions in case the image cant be loaded. It just bring white square widget at lower left corner and it prints in the log that "none type has no attribute tell"
Created: 2019-12-22T14:46:08Z
Versions

Python:
OS:
Kivy:
Kivy installation method:

Description
// REPLACE ME: What are you trying to get done, what has happened, what went wrong, and what did you expect?
Code and Logs
// REPLACE ME: Paste your code and logs here, a template can be found at https://git.io/vM1id.

Closing comment (2023-11-03T06:12:50Z): Duplicate of #7844 (even though this was earlier)
Repository: klembot/twinejs

Issue #149: Use Twine Online with iPhone
Created: 2015-05-27T17:20:53Z
Originally reported by: Stourley Kracklite (Bitbucket: stourleyk, GitHub: Unknown)

Using Twine online with my iPhone I cannot see the full window for "What should your story be named?"  This window cannot be panned or re-sized for viewing in full.  I am able to type in it but am not able to see the entered characters as they are off-screen to the left. Once I have typed the name of my story and clicked to Add, the next screen does not have the Untitled Passage editable box, nor is this box to be found by panning or re-sizing.


Bitbucket: https://bitbucket.org/klembot/twinejs/issue/149

Duplicate issue #1520: Impossible to close a passage on a Pixel 4a
Created: 2024-04-24T15:43:17Z
Describe the bug.
The button to close the modal view for editing a passage is covered by the "Go To" button.
See this image:

Steps to reproduce:
Go to https://twinery.org/2/#/ on a mobile device with a low resolution screen (I tested it on a Pixel 4a)
Create a story and edit a passage
Attempt to close the passage editor (impossible as the button is covered by another)
Expected behavior:
All of the buttons ought to be usable with no overlap between them
Additional context on this problem.
No response
Twine version number
Latest
Does this problem occur with the web version of Twine or the desktop app?
Web
What operating system does this problem occur on?
Android
If this problem is occurring with the web version of Twine, what browser does it occur on?
Vanadium, Firefox, and Bromite
Presubmission checklist

 I am interested in working on code that would fix this bug. (This is not required to submit a bug report.)
 I have done a search and believe that an issue does not already exist for this bug in the GitHub repository.
 If this problem is occurring with the app version of Twine, it still happens after I remove the user.css file from my Twine folder. (You would've added this file yourself. If you don't understand this question, you can safely check this box.)
 I have read and agree to abide by this project's Code of Conduct.

Closing comment (2024-04-27T20:01:57Z): More or less a dupe of #149. Twine doesn't currently consciously support phone-sized viewports right now, as noted in docs.
Repository: klembot/twinejs

Issue #1178: 2.4.0 Twine crashes when story format is missing
Created: 2022-07-06T15:03:42Z
Describe the bug.
When opening a story created with Harlowe 3.2.3 (without 3.2.3 installed) I get the following error:

There is no option at this point other than to restart Twine. When I do so the story has been converted to 3.3.0.
Steps to reproduce:
Open a story created in a format that is not installed.
Expected behavior:
Either a non-fatal warning, or the story simply opens with the default format.
Additional context on this problem.
This appears to be the same error that many people report on first opening 2.4.0, even though they have not yet opened a story.
Twine version number
2.4.0
Does this problem occur with the web version of Twine or the desktop app?
Desktop app
What operating system does this problem occur on?
macOS
If this problem is occurring with the web version of Twine, what browser does it occur on?
No response
Presubmission checklist

 I am interested in working on code that would fix this bug. (This is not required to submit a bug report.)
 I have done a search and believe that an issue does not already exist for this bug in the GitHub repository.
 I have read and agree to abide by this project's Code of Conduct.

Duplicate issue #1187: Web Version Broke
Created: 2022-07-11T10:49:55Z
Describe the bug.

Steps to reproduce:
Tried to create a Story, it had my previous stored stories - got this.
Expected behavior:
Er
Additional context on this problem.
Mac (Monterey, Google Chrome latest)
Twine version number
Web
Does this problem occur with the web version of Twine or the desktop app?
Web
What operating system does this problem occur on?
macOS
If this problem is occurring with the web version of Twine, what browser does it occur on?
Chrome/Chromium
Presubmission checklist

 I am interested in working on code that would fix this bug. (This is not required to submit a bug report.)
 I have done a search and believe that an issue does not already exist for this bug in the GitHub repository.
 I have read and agree to abide by this project's Code of Conduct.

Closing comment (2022-07-11T17:48:10Z): This is a duplicate of #1178
Repository: klembot/twinejs

Issue #31: Does not allow me to continue when I make a choice.
Created: 2014-06-18T19:09:29Z
Originally reported by: Anonymous

I made a story and when i choose to ask something it does not move. Is it a dialogue problem or?


Bitbucket: https://bitbucket.org/klembot/twinejs/issue/31

Duplicate issue #171: Replace app.replaceContent
Created: 2015-08-16T13:43:20Z
Originally reported by: Bob Page (Bitbucket: damongant, GitHub: damongant)

https://bitbucket.org/klembot/twinejs/src/b2b7af8ec286956e32970419e5a0366b43b57900/js/app.js?at=default#app.js-238
This code makes way too many assumptions about the story format.

body and head cannot have attributes
your JS can't have  in it. Uncompressed Angular, for instance, does (in documentation comments).



Bitbucket: https://bitbucket.org/klembot/twinejs/issue/171

Closing comment (2015-08-16T14:42:29Z): Original comment by Bob Page (Bitbucket: damongant, GitHub: damongant):

Duplicate of #31.
Repository: klembot/twinejs

Issue #19: When importing from file, offer to replace stories with the same name
Created: 2014-04-14T03:09:52Z
Originally reported by: Chris Klimas (Bitbucket: klembot, GitHub: klembot)



Bitbucket: https://bitbucket.org/klembot/twinejs/issue/19

Duplicate issue #224: Imported compiled story overwrites existing story with same name
Created: 2015-12-08T23:27:55Z
Originally reported by: greyelf (Bitbucket: greyelf, GitHub: greyelf)

This issue occurred while using the Windows 64 release of Twine 2.0.10
If you use the Import From File option to import a story HTML file created via Publish to File option and if a story project with the same name already in the Story List then the following happens:

Both the new and the existing story project will appear in the Story List
If you close and restart the Twine application one of the two instances will be removed, the equivalent of it being deleted. In my tests it was generally the older/existing story project that was overwritten by the newly imported one.

I understand that this is due to both story projects having the same file name in the Twine Library folder and thus the existing one only exists in memory until the application is closed.
This behaviour is different to the hosted release, this supports multiple copies of the same named story project, and has resulted in users losing story content.


Bitbucket: https://bitbucket.org/klembot/twinejs/issue/224

Closing comment (2016-01-30T16:49:16Z): Original comment by Chris Klimas (Bitbucket: klembot, GitHub: klembot):

Duplicate of #19.
Repository: klembot/twinejs

Issue #306: Beta does not create Documents/Twine/stories on installation
Created: 2016-11-30T23:15:58Z
Originally reported by: furkle industries (Bitbucket: furkle, GitHub: furkle)


i've just gotten a new computer, and upon downloading the beta, realized that the editor refuses to start if the /Documents/Twine/stories directory doesn't already exist.


Bitbucket: https://bitbucket.org/klembot/twinejs/issue/306

Duplicate issue #321: Does not work at all
Created: 2017-01-02T10:30:43Z
Originally reported by: Fernando Setien (Bitbucket: fnomine, GitHub: Unknown)

Just install, Runs but does not show nothing.
With the lastest update from today.


Bitbucket: https://bitbucket.org/klembot/twinejs/issue/321

Closing comment (2017-01-03T22:06:42Z): Original comment by Chris Klimas (Bitbucket: klembot, GitHub: klembot):

Duplicate of #306.