Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: type object 'Globals' has no attribute 'flipHorizontal' #2

Open
jpfy opened this issue Mar 22, 2019 · 5 comments
Open

Comments

@jpfy
Copy link

jpfy commented Mar 22, 2019

On opening the app I am getting the following error:

Traceback (most recent call last):
File "microVIEW.py", line 1539, in
Run_microVIEW()
File "microVIEW.py", line 1522, in Run_microVIEW
microVIEW(microVIEWApp,camera,language,appTitle,width,height)
File "microVIEW.py", line 276, in init
value=Globals.flipHorizontal,text=['OFF','ON'],
AttributeError: type object 'Globals' has no attribute 'flipHorizontal'

It initaly displays the app interface then promply gives the error.
I am not using a touch screen but a normal 1080 HDMI with mouse.

@jpfy
Copy link
Author

jpfy commented Mar 22, 2019

I have tried creating a
flipHorizontal = False
flipVertical = False
in the Global.py file but then it just hangs on the next setting.
Using IDLE3 I am getting the basic settings interface but no picture and when I go to the advance box it shows the flip horisontal and flip vertical but nill else.

@jpfy
Copy link
Author

jpfy commented Mar 22, 2019

I tried version before the last commit and it worked fine.

@CarverFan
Copy link

CarverFan commented Aug 31, 2019

Hi, I have this same problem. I'm running on raspbian (bespoke version that comes with OpenAuto Pro) with the Raspberry Pi 3 B+ official 7 inch touch screen. Could it be something to do with the screen size/resolution?

When I run PiCameraApp.py that works but the configuration window is bigger than the screen... is this related?

A couple of screenshots follow:
2019-08-31_14h44_45

2019-08-31_14h40_34

Thank you so much for writing this app! I got really (too!) excited when I stumbled across it - it's the perfect solution for my Rear View Camera - integrating with Open Auto Pro.

@CarverFan
Copy link

CarverFan commented Aug 31, 2019

Hello again,

I think I've got it working. I've added the following lines to the end of the Globals.py file:

` flipHorizontal = False

    flipVertical = False

    rotateValue = False

`
After adding the flipVertical and before adding the rotateValue, I got the following error:

pi@raspberrypi:/usr/local/bin/microVIEW/microVIEW-master $ sudo python3 microVIEW.py
Traceback (most recent call last):
File "microVIEW.py", line 1539, in
Run_microVIEW()
File "microVIEW.py", line 1522, in Run_microVIEW
microVIEW(microVIEWApp,camera,language,appTitle,width,height)
File "microVIEW.py", line 293, in init
callback=self.ToggleRotate,language=self.language)
File "/usr/local/bin/microVIEW/microVIEW-master/Buttons.py", line 210, in init
self.DrawText()
File "/usr/local/bin/microVIEW/microVIEW-master/Buttons.py", line 240, in DrawText
txt = self._text[self._state]
TypeError: 'NoneType' object is not subscriptable

So I changed line 238 of the Buttons.py file to this:

            #if self.lang:  txt = self.lang.GetText(self._text[self._state])
          #else:  txt = self._text[self._state]
        txt = self._text

Commented out two lines and set txt to self._text

The screen still doesn't fit my 7 inch monitor but I'm able to change settings! Really not sure whether what I've done is 'correct' - I'm really just hacking here :)

Adding some screenshots:

2019-08-31_16h05_13
2019-08-31_16h03_51

@Billwilliams1952
Copy link
Owner

I’ve updated the Github files to remove the errors. Also the App better supports the higher photo resolution of the V2 camera module.

Bill

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants