question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: 'App' object has no attribute 'open_document'

See original GitHub issue

Expected Behavior

No error

Current Behavior

Receive following error on startup: Traceback (most recent call last): File "_ctypes/callbacks.c", line 232, in 'calling callback function' File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/rubicon/objc/api.py", line 232, in __call__ result = self.py_method(py_self, *args) File "/Users/Me/Documents/Atom/YAPI/toga/src/cocoa/toga_cocoa/app.py", line 63, in application_openFiles_ self.impl.open_document(str(fileURL.absoluteString)) AttributeError: 'App' object has no attribute 'open_document'

Steps to reproduce

  1. Download toga from source.

  2. Run project on MacOS

Your Environment

  • Python Version: 3.7.0

  • Operating System and Version:

    • macOS - version: 10.14.3 Beta 18D39a
    • Linux - distro: - version:
    • Windows - version:
    • Other - name: - version:
  • Toga Target:

    • android
    • cocoa
    • django
    • gtk
    • iOS
    • tvOS
    • watchOS
    • winforms
    • win32
    • Other (please specify)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
freakboy3742commented, Apr 25, 2020

Toga now supports python foo.py, python -m foo, and briefcase dev as execution methods.

1reaction
worship-togethercommented, Mar 9, 2019

Had the same issue with the your first toga app (‘App’ object has no attribute ‘open_document’). Solution in our case is to run the app with python -m. That issue went away. Before doing that, we had to also do the following:

$ git clone https:///github.com/pybee/toga.git $ cd toga $ pip install src/core $ pip install src/cocoa

Read more comments on GitHub >

github_iconTop Results From Across the Web

Attribute error: 'app' object has no attribute 'calc' - Stack Overflow
Your code is expecting the app class to have a calc method ( def calc(self, ...) ), but your code is missing that...
Read more >
AttributeError: 'App' object has no attribute 'run' : r/learnpython
This little script is crashing with the error: 'App' object has no attribute 'run'. Any ideas? Python code found in submission text that's...
Read more >
[Tkinter] AttributeError: 'App' object has no attribute 'set_text'
I am creating a python tkinter gui application.When i run my code the gui works fine but the buttons are not working properly....
Read more >
IO tools (text, CSV, HDF5, …) — pandas 1.5.2 documentation
If file contains no header row, then you should explicitly pass header=None ... In [8]: store.foo.bar.bah AttributeError: 'HDFStore' object has no attribute ......
Read more >
QLIKVIEW AUTOMATION WITH PYTHON IS BACK!
@matteo_mi , Good Day, I have got the same error "AttributeError: 'QlikView' object has no attribute 'reload' " even after changing q.reload( ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found